Moroccan television showed scenes from the aftermath, as many stayed outside fearing aftershocks.
Anxious families stood in the streets or huddled on the pavement, some carrying children, blankets or other belongings. Emergency workers looked for survivors in the rubble of buildings, their reflective yellow vests illuminating the nighttime landscape. The quake ripped a gaping hole in a home, and a car was nearly buried by the chunks of a collapsed building.
Baskets, buckets and clothing could be seen amid scattered stones in the remains of one building.
Moroccan media reported that the 12th-century Koutoubia Mosque in Marrakech, one of the city’s most famed landmarks, suffered damage, but the extent was not immediately clear. Its 69m minaret is known as the “roof of Marrakech”.
Moroccans posted videos showing buildings reduced to rubble and dust and parts of the famous red walls that surround the old city in historic Marrakech, a UNESCO World Heritage site, damaged.
Tourists and others posted videos of people screaming and evacuating restaurants in the city as throbbing club music played.
Reports on damage and any casualties often take time to filter in after many earthquakes, particularly those that hit in the middle of the night.
Rather than return to concrete buildings, men, women and children stayed out in the streets worried about aftershocks and other reverberations that could cause their homes to sway.
The US Geological Survey said the quake had a preliminary magnitude of 6.8 when it hit at 11.11pm (local time), with shaking that lasted several seconds.
Morocco’s National Seismic Monitoring and Alert Network measured it at 7 on the Richter scale. The US agency reported a magnitude-4.9 aftershock hit 19 minutes later.
The USGS said the epicentre was 18km below the Earth’s surface, while Morocco’s seismic agency put it at 8km down.
In either case, such shallow quakes are more dangerous.
The epicentre of Friday’s tremor was high in the Atlas Mountains, roughly 70km south of Marrakech. It was also near Toubkal, the highest peak in North Africa and Oukaimeden, a popular Moroccan ski resort.
Earthquakes are relatively rare in North Africa. Lahcen Mhanni, Head of the Seismic Monitoring and Warning Department at the National Institute of Geophysics, told 2M TV that the earthquake was “exceptional”.
“Mountainous regions in general do not produce earthquakes of this size,” he said. “It is the strongest earthquake recorded in the region.”
In 1960, a magnitude 5.8 tremor struck near the Moroccan city of Agadir and caused thousands of deaths.
The Agadir quake prompted changes in construction rules in Morocco, but many buildings, especially rural homes, are not built to withstand such tremors.
Friday’s quake was felt as far away as Portugal and Algeria, according to the Portuguese Institute for Sea and Atmosphere and Algeria’s Civil Defence agency, which oversees emergency response.