At least 632 killed and 329 injured, according to Moroccan state media.
The quake hit just after 11pm local time (22:00 GMT).
The earthquake’s epicentre was at a depth of 18.5km (11.5 miles) and occurred about 72km (44 miles) northeast of Marrakesh, according to the USGS.
Footage on social media reported to be of the earthquake showed tremors being felt and people running into the streets and buildings shaking.
No risk of tsunami: Official
Lahsen Mhanni, the head of the seismic monitoring service in Morocco, said that the earthquake resulted in tens of aftershocks, the maximum of which was at magnitude five.
He told Al Jazeera from Rabat: “Tens of aftershocks will still be recorded, but they will be lower magnitude than the main one. And with time, they will decrease gradually until the geological infrastructure becomes balanced again.”
He added that there was no current danger of a tsunami.