The earthquake, which had a magnitude of 6.8 on the Richter scale, occurred shortly after 11 pm local time in the area between the city of Marrakech and the coastal city of Agadir in southwestern Morocco.
The earthquake occurred approximately 19 kilometers underground, according to the US Geological Survey, USGS.
According to a local official, dozens of people have died and several have been injured, according to the Reuters news agency. Several buildings have reportedly collapsed in Marrakech and people have fled their homes and gathered in the streets.
The authority USGS has given an initial assessment that there is a risk of several deaths, as many in the affected cities live in houses that are not equipped to withstand earthquakes.
The text is updated.