A powerful earthquake in Morocco has killed more than 800 people and injured hundreds more, destroying buildings and sending residents of major cities rushing from their homes in the country's deadliest tremor in more than six decades.
The magnitude 7.2 quake struck in Morocco's High Atlas mountains late on Friday night. The interior ministry said 820 people had been killed and another 672 injured, in an updated casualty toll. A local official said most deaths were in mountain areas that were hard to reach.
In Marrakech, the nearest big city to the epicentre, residents spent the night in the open, afraid to go home.
A mosque minaret had fallen in Jemaa al-Fna Square, the heart of Marrakech's old city, a Unesco World Heritage site.
"We had to run right after the strong quake," said Jaouhari Mohamed, a resident of the old city, describing desperate scenes as people fled for safety.
"I still can't sleep in the house because of the shock and also because the old town is made up of old houses. If one falls, it will cause others to collapse," he said.
Local television showed pictures of rubble lying on smashed cars.
The Interior Ministry urged calm, saying in a televised statement that the quake had hit the provinces of Al Haouz, Ouarzazate, Marrakech, Azilal, Chichaoua and Taroudant.
Montasir Itri, a resident of the mountain village of Asni near the epicentre, said most houses there were damaged. "Our neighbours are under the rubble and people are working hard to rescue them using available means in the village," he said.
Further west, near Taroudant, teacher Hamid Afkar said he had fled his home and felt aftershocks. "The earth shook for about 20 seconds. Doors opened and shut by themselves as I rushed downstairs from the second floor," he said.
Morocco's geophysical centre said the quake struck just after 11pm (2200 GMT) in the Ighil area of the High Atlas.
It was Morocco's deadliest since at least a 2004 tremor in the northern Rif mountains that killed over 600 people.
Ighil, a mountainous area with small farming villages, is about 70km southwest of Marrakech.
Spanish television RTVE reported tremors from the earthquake were felt in Huelva and Jaen in Andalusia, southern Spain.
The United Nations stood ready to help the Moroccan government in "its efforts to assist the impacted population", UN spokesman Stephane Dujarric said in a statement.
Governments around the world expressed solidarity and offered assistance.
Marrakech is due to host the annual meetings of the International Monetary Fund and World Bank in early October.
In Marrakech, some houses in the tightly packed old city had collapsed and people were working hard by hand to remove debris while they waited for heavy equipment, said resident Id Waaziz Hassan.
Footage of the medieval city wall showed big cracks in one section and parts that had fallen, with rubble lying on the street.
Another Marrakech resident, Brahim Himmi, said he saw ambulances coming out of the old town and many building facades damaged. He said people were frightened and were staying outside in case of another quake.
"The chandelier fell from the ceiling and I ran out. I'm still in the road with my children and we're scared," said Houda Hafsi, 43, in Marrakech.
Another woman there, Dalila Fahem, said there were cracks in her house and damage to her furniture. "Fortunately I hadn't gone to sleep yet," she said.
The city is due to host the IMF and World Bank in a month's time.
People in the capital city of Rabat, about 350km north of Ighil, and in the coastal town of Imsouane, about 180km to its west, also fled their homes, fearing a stronger quake, according to Reuters witnesses.
In Casablanca, some 250km north of Ighil, people who spent the night in the streets were too scared to return to their homes.
"The house rocked aggressively, everyone was scared," said resident Mohamed Taqafi. "I thought it was only my house that was moving because it's fragile and old. I heard people screaming, everyone went out of their houses."
Videos shared on social media of the immediate aftermath of the quake, which Reuters could not immediately verify, showed people fearfully running out of a shopping centre, restaurants and apartment buildings and congregating outside.