With much of the quake zone in hard-to-reach areas, the full impact has yet to emerge. The authorities have not issued any estimates for the number of people still missing.
The earthquake hit after 11pm (22:00 GMT) on Friday evening, according to the United States Geological Survey (USGS). It struck 72km (45 miles) southwest of Marrakesh, Morocco’s fourth largest city.
The epicentre was Ighil, a mountainous rural commune in Al-Haouz province near the Oukaimeden ski resort in the Atlas Mountains.
The quake was felt throughout the country, including in the provinces of Ouarzazate, Marrakesh, Azilal, Chichaoua and Taroudant.
A number of countries have sent messages of condolence alongside offers of aid.