A strong earthquake has struck central Mexico, killing more than 200 people and toppling dozens of buildings in the capital, Mexico City.
At least 30 people, mostly children, died after a school collapsed in the capital, local media report.
The 7.1 magnitude quake also caused major damage in neighbouring states.
It struck shortly after many people had taken part in an earthquake drill, exactly 32 years after a quake killed thousands in Mexico City.
The country is prone to earthquakes and earlier this month an 8.1 magnitude tremor in the south left at least 90 people dead.
Though it struck a similar region, Tuesday's earthquake does not appear to be connected with the quake on 7 September, which was at least 30 times more energetic, the BBC's Jonathan Amos writes.
The epicentre of the latest quake was near Atencingo in Puebla state, about 120km (75 miles) from Mexico City, with a depth of 51km, the US Geological Survey says.
The prolonged tremor hit at 13:14 local time (18:14 GMT) on Tuesday and sent thousands of residents into the streets.
An earlier death toll of nearly 250 was lowered to 217 by the country's national co-ordinator for civil protection:
As many as 37 people - 32 children and five adults - died when the Enrique Rébsamen elementary school collapsed in Mexico City's southern Coapa district, Efe news agency reports, quoting local media.
According to Mexican news site Reforma, 30 bodies have been found at the school and 22 people are missing.
Elsewhere, 15 people were killed when a church near Mexico's Popocatepetl volcano collapsed during Mass, Puebla's governor is quoted by Reuters news agency as saying. The volcano itself had a small eruption as a result of the tremor.
Getty ImagesRescuers celebrated as three people were pulled alive from the Enrique Rébsamen school overnight - but many are still feared trappedAlfredo del Mazo Maza, governor of the State of Mexico, said schools would be closed on Wednesday. He also ordered all public transport to operate services for free so that people could travel home.
Emergency workers, aided by military personnel and volunteers, have been working through the night in the search for people trapped under the rubble of collapsed buildings.
At the Enrique Rébsamen school, three people were rescued at about midnight, Reuters reports, adding that one child trapped under the debris was saved after oxygen was supplied through a tube.
At least 209 schools were affected by the quake, 15 of which have suffered severe damage, Mexico's Secretariat of Public Education says.
Buildings at 44 locations collapsed or were badly damaged, Mexico City Mayor Miguel Angel Mancera told TV network Televisa. These are said to include a six-storey block of flats, a supermarket and a factory.
Getty ImagesVolunteers worked frantically to find survivors beneath the rubbleAbout two million people in the capital were left without electricity and phone lines were down. Officials warned residents not to smoke on the streets as gas mains could have been ruptured.
Some 70% of the electricity supply which went down has now been restored, Mexico's Federal Electricity Commission said.
In a televised address, the president said an emergency had been declared for the affected areas and the military had been drafted in to help with the response.
He also urged residents whose properties were structurally sound to remain in their homes where possible to allow emergency services and those helping with rescue efforts to clear the streets.
Across Mexico City, teams of rescue workers and volunteers clawed through the rubble with picks, shovels and their bare hands.
AFPRescuers and volunteers tried to find survivors under the debris of collapsed buildingsAFPThe rescue operation continued into the night"My wife is there. I haven't been able to communicate with her," Juan Jesus Garcia, 33, told Reuters, choking back tears next to a collapsed building.
"She is not answering and now they are telling us we have to turn off our mobile phones because there is a gas leak."
Have you been affected by the earthquake? If it is safe to do so you can email your story to haveyoursay@bbc.co.uk
The strong quake was felt in the capital, Mexico CityJennifer Swaddle, a teacher at the British International School in Mexico City, told the BBC that part of her classroom had collapsed.
"As we were leaving, the outside of my classroom wall fell, so there was a big pile of rubble. Luckily, fantastically, nobody was hurt, but it was incredibly frightening," she said.
An earthquake drill was being held in Mexico City on Tuesday to mark the 32nd anniversary of a magnitude 8 quake that killed up to 10,000 people and left 30,000 others injured.
The severe tremor caused serious damage to Mexico City and its surrounding areas, with more than 400 buildings collapsed and thousands more damaged.
Correspondents say that residents may have mistaken earthquake alarms for part of the day of drills in the wake of the 1985 quake.
Mexico City is one of the most densely populated cities in the world, with more than 20 million people living in the metropolitan area.
Mexico is one of the most seismically active regions in the world, sitting on top of three of the Earth's largest tectonic plates - the North American, Cocos and Pacific plates.
The latest tremor occurred near the boundary between the North American and Cocos plates, where the latter slides beneath the former.
According to the US Geological Survey, the country has seen 19 earthquakes of at least 6.5 magnitude within 155 miles of the epicentre of Tuesday's quake over the past century.
Foreign leaders sent messages of support to Mexico as the scale of the disaster became clear:
The Mexican government earlier issued the following guidance on what to do if a quake strikes in the country:
The UK Foreign Office has said that those travelling to Mexico should follow the advice of the local authorities.
BBC in other languagesInnovationncG1vNJzZmivp6x7o67CZ5qopV%2Bjsri%2FjrCmq6SUYrmiwMinZJqllae2pK2MbWhsamdqhnQ%3D