Fatalities from the magnitude 7.0 quake occurred in various regions, including Al Haouz and Marrakesh provinces, as well as the cities of Ouarzazate, Azilal, Chichaoua and Taroudant, the ministry said in a statement.
The earthquake was the strongest tremor to hit the North African country in the last century, Morocco’s National Geophysical Institute said.
The United States Geological Survey (USGS) said the epicenter of the earthquake, which hit just after 11 p.m. local time (22:00 GMT), was 75 kilometers (46.6 miles) southeast of Marrakech, at a depth of 18.5 km.
Videos on social media captured the immediate aftermath and showed residents spilling out onto the streets.
The situation was said to be particularly dire in the Marrakech region, where numerous buildings were said to be collapsed and residents trapped under debris.
Local media said some buildings, including the famous red walls that surround the old city, a UNESCO World Heritage, were damaged.
The Royal Armed Forces urged citizens to exercise caution and directed them toward safe areas to shield them from aftershocks.
Tremors were also felt in neighboring Algeria and Mauritania.
Moroccan authorities have launched an operation to deliver aid to areas struck by the earthquake, according to the state news agency MAP.
"Seven trucks loaded with blankets, camp beds and lighting equipment are ready in Al Arjat village in the northern city of Sale to be delivered to residents of affected areas,” MAP said.
In 2004, more than 600 people were killed and many others injured when a magnitude 6.3 quake hit northeastern Morocco. — Agencies