The army said three other people were severely wounded in the crash, in what is thought to be one of Morocco’s deadliest air disasters in years.
The C-130 Hercules aircraft crashed in Guelmine, just north of the disputed Western Sahara territory.
The army blames the accident on poor weather.
The plane was carrying 81 people: nine crew members, 60 troops and 12 civilians.
Forty-two bodies have been found. The search continues for the others.