Mexico's National Civil Defense agency put the death toll at 248 early Wednesday, but later reduced the number to 217. The reasons for this discrepancy were not immediately clear.
Dozens of buildings tumbled into mounds of rubble or were severely damaged in densely populated parts of Mexico City. Mayor Miguel Angel Mancera said buildings fell at 44 places in the capital alone as high-rises across the city swayed sickeningly.
Damaged hospitals evacuated patients.
The federal Education Department reported late Tuesday night that 25 bodies had been recovered from the wreckage of a school in southern Mexico City, where a wing of the three-story building collapsed into a massive pancake of concrete floor slabs. It was not clear whether the deaths were included in the overall toll reported by the federal civil defense agency.
In the Mexico City neighborhood of Roma, rescue workers cheered after finding a woman alive under rubble, according to the AP. They then quieted down to listen for calls from other survivors.
Mexico's Secretariat of National Defense said 3,400 soldiers were deployed.
Robert W. Bouman was in Mexico City visiting family when the quake struck — the second he had experienced in Mexico in less than two weeks."It's an incredibly terrifying and scary experience," Bouman, 31, told NBC News. "This time, the quake was much more violent. We had trouble standing and walking. It was impossible to maintain your balance."
Videos on social media showed tables and light fixtures shaking in restaurants and street signs and traffic lights quivering outside.
Texas Gov. Greg Abbott offered "the thoughts and prayers of Texans" to Mexico and said the state would "continue to offer any support to aid Mexico in their time of need."
A spokesman for António Guterres, the secretary-general of the United Nations, said that he extended his condolences and that "the United Nations stands ready to assist."
Earthquake expert Lucy Jones, who spent 33 years at the USGS, told NBC News that the earthquake was "quite an unusual occasion" because of where it occurred.
"It's a place that doesn't usually have earthquakes, but it can. It's sort of like having a magnitude-7 in Nevada — they aren't as common as in California, but they definitely have happened," Jones said.
Earlier on Tuesday, buildings across Mexico City held earthquake drills to mark the anniversary of the massive Sept. 19, 1985, earthquake that killed at least 9,500 people, the AP said.
Valerie Perez, 23, a student from Venezuela, ran from her fourth-floor apartment in Mexico City just in time to see the building in front of it collapse.
"A drill at 11 a.m. and an earthquake at 1 p.m.," she said. "This is the most powerful thing I have ever seen in my life."
Elizabeth Chuck is a reporter for NBC News.
Daniella Silva is a reporter for NBC News, specializing in immigration and inclusion issues, as well as coverage of Latin America.
Rima Abdelkader is a reporter and producer for NBC News, covering national and international news.
Gemma DiCasimirro, Jason Cumming, Erin Calabrese and The Associated Press contributed.