The earthquake occurred around 23:00 local time at a relatively shallow depth of 18.5 kilometers. The epicenter was in the High Atlas Mountains, about 72 kilometers southwest of Marrakech, a city of about 840,000 people.