A magnitude-6.9 earthquake jolted Morocco at a depth of 10 kilometers on Friday, according to the China Earthquake Networks Center (CENC).
At least 20 buildings collapsed in the city of Marrakech after the quake, according to a CMG reporter.
Videos shared on social media showed buildings shaking and people running out and congregating outside.
There were no immediate reports of casualties.
Morocco experiences frequent earthquakes in its northern region due to its position between the African and Eurasian plates.
In 2004, at least 628 people were killed when a quake hit Al Hoceima in northeastern Morocco.
(With input from agencies)