A powerful 7.1 magnitude earthquake has killed at least 149 people, including 22 pupils from one school in central Mexico, according to officials.
The tremor on Tuesday struck 8km southeast of Atencingo in the central state of Puebla, about 120km from the capital, Mexico City, the US Geological Survey (USGS) said.
Scores of buildings collapsed into mounds of rubble or were severely damaged in densely populated parts of Mexico City and nearby states.
"At the moment..149 [are] deceased," Luis Felipe Puente, director of the government's civil protection service, said on Twitter late on Tuesday.
He said there were 49 deaths in Mexico City.
In Morelos state, directly south of the capital, at least 55 people were killed.
The state of Puebla, where the epicentre of the earthquake struck, reported at least 32 deaths.
At least 10 people died in Mexico state, which lies just to the west of Mexico City, while in Guerrero one person died.
President Enrique Pena Nieto said that among those killed were 22 children from the Enrique Rebsamen School in southern Mexico City, while 38 were still missing.
Javier Trevina, the education secretary, told local news media that eight adults also died when the school collapsed.
Mexico City's international airport suspended operations and was checking facilities for any damage.
Clouds of dust rose from fallen pieces of facades in Mexico City, and local TV footage and social media purportedly showed some buildings with severe damage.
Miguel Angel Mancera, the mayor of Mexico City, said 44 buildings collapsed in the capital alone.
Rescue workers and residents dug through the rubble of collapsed buildings seeking survivors.
At one site in the Mexico City neighbourhood of Roma, rescue workers cheered as they brought a woman out alive from what remained of a toppled building.
Local media broadcast video of whitecap waves churning the city's normally placid canals of Xochimilco as boats bobbled up and down.
Al Jazeera's Amparo Rodriguez, reporting from Mexico City, said that while this was not the strongest earthquake Mexico has experienced in the last month, "what makes it different is that the epicentre was quite close to the capital".
Hours after the quake, rescue workers were still clawing through the wreckage of a primary school that partly collapsed in Mexico City, looking for children who might still be trapped.
Some relatives said they had received WhatsApp messages from two girls inside.
Al Jazeera's Ali Rae, who was in Mexico City when the earthquake struck, said: "The building I was in began to sway back and forth. As the waves got stronger, the shelves began to empty and a glass cabinet fell nearby.
"My friend and I were in a bit of shock. My legs felt like jelly as we left the building to join others outside. While it was a bit of a scare for us - we were completely fine compared to other parts of the city hit a lot worse."
Earlier this month, a powerful 8.1 quake hit southern Mexico, killing at least 98 people.
The worst earthquake in the history of Mexico occurred on September 19, 1985, killing nearly 10,000 people.
Mexico City was among the places that were seriously affected.