MARRAKECH, Morocco - 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.

Buildings in the old city, a UNESCO World Heritage site, suffered damage. A mosque minaret had fallen in Jemaa al-Fna Square, the heart of Marrakech's old city. Rescue workers dug through the rubble.

"Everything is by God's will, but we sustained great harm," said Miloud Skrout, a resident.

Some 150 people, mostly relatives of the injured, were waiting outside a local hospital. Most had come from mountainous areas outside the city as their local hospitals lack capacity to treat serious injuries.

"I still can’t sleep in the house because of the shock and also because the old town is made up of old houses," said Jaouhari Mohamed, a resident of Marrakech old city, describing desperate scenes as people fled for safety.

"If one falls, it will cause others to collapse," he said.

An Australian tourist who gave her name as Tri said the room started shaking. "We just grabbed some clothes and our bags and we raced out," she said, clutching a pillow under her arm.

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 11 p.m. (2200 GMT) in the Ighil area of the High Atlas.

It was Morocco's deadliest since 1960 when a tremor was estimated to have killed at least 12,000 people, according to the U.S. Geological Survey.

Ighil, a mountainous area with small farming villages, is about 70 km (40 miles) southwest of Marrakech.

Spanish television RTVE reported tremors from the earthquake were felt in Huelva and Jaen in Andalusia, southern Spain.

Governments around the world expressed solidarity and offered assistance. Turkey, where powerful earthquakes in February killed more than 50,000 people, said it was ready to provide support.

Marrakech is due to host the annual meetings of the International Monetary Fund and World Bank in early October.

MARRAKECH DAMAGE

In Marrakech, some houses in the tightly packed old city had collapsed and people used their hands 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.

People in the capital city of Rabat, about 350 km north of Ighil, and in the coastal town of Imsouane, about 180 km to its west, also fled their homes, fearing a stronger quake, according to Reuters witnesses.

In Casablanca, some 250 km 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. 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.

(Reporting by Ahmed El Jechtimi in Rabat; Additional reporting by Zakia Abdennebi in Rabat, Alexander Cornwell in Imsouane, Ahmed Tolba in Dubai and Jose Joseph in Bengaluru, Michelle Nichols in New York, Keely Graham in Madrid; Writing by Angus McDowall and Tom Perry; Editing by William Mallard, Stephen Coates and Tomasz Janowski)