The epicentre of the quake was in the High Atlas Mountains, 71km (44 miles) south-west of Marrakesh, according to the US Geological Survey.
The area is known for small farming villages, which have been devastated by the quake. The worst-hit area is the al-Haouz province.
Some parts of Marrakesh's historic medina, a Unesco heritage site, and its network of alleyways saw significant damage.
It's the biggest earthquake the area has seen in over a century, and it's unusual for such a powerful one to strike in Morocco.
Aftershocks will continue for days, perhaps weeks, Rémy Bossu, the director of the European-Mediterranean Seismological Centre told the BBC yesterday.