An earthquake has ravaged the central regions of Mexico, with the death toll currently at 226 and expected to rise. Among the dead are 21 children killed when their primary school building collapsed.

The US Geological Survey said the earthquake was 7.1 magnitude, hitting 5 miles (8km) south-east of Atencingo in the state of Puebla at a depth of 32 miles (51km). Mexico's seismological agency calculated its preliminary magnitude at 6.8. The quake struck on the anniversary of the 1985 earthquake that also left major destruction.

Dozens of buildings tumbled into mounds of rubble or were severely damaged in densely populated parts of Mexico City and nearby states. Mayor Miguel Angel Mancera said buildings fell at 44 places in the capital alone as high-rises across the city swayed sickeningly.

Hours after the quake, rescue workers were still clawing through the wreckage of a primary school that partly collapsed in the city's south looking for any children who might be trapped. Some relatives said they had received Whatsapp message from two girls inside.

The federal Education Department reported late Tuesday night that 25 bodies had been recovered from the school's wreckage, all but four of them children. It was not clear whether the deaths were included in the overall death toll of 226 reported by the federal civil defense agency.

President Enrique Pena Nieto visited the school earlier in the night. At the time, he said 22 bodies had been found, and added in comments broadcast online by Financiero TV that 30 children and eight adults were reported missing. Rescuers were continuing their search and pausing to listen for voices from the rubble.

Later, Pena Nieto issued a video message urging calm and saying the initial focus of authorities is on finding people trapped in fallen buildings.

"The priority at this moment is to keep rescuing people who are still trapped and to give medical attention to the injured people," he said. Local television broadcast images of collapsed buildings and rubble-filled streets.

Mexico City earthquake
People react as a real quake rattles Mexico City on 19 September 2017 as an earthquake drill was being held in the capital RONALDO SCHEMIDT/AFP/Getty Images

The powerful quake sent thousands of office workers running into the streets, though the full extent of the damage is unknown. Reuters reported residents hugged each other along Mexico City's central Reforma Avenue as alarms blasted and traffic came to a standstill around the Angel of Independence monument.

Video posted on Twitter shows office workers rushing out of their building as it swayed, sending light fixtures and computers toppling. Some sought refuge under desks.

Edith Lopez, a 25-year-old market stall vendor, told reporters she was in a taxi cab when the earthquake struck. Lopez said she witnessed glass blow out of the windows of a few buildings. She said she was anxiously trying to reach her children, who she had left in the care of her disabled mother.

Mexico's Secretariat of National Defence said 3,400 soldiers had been deployed to support the region, NBC News reported.

Mexican TV stations have shown dramatic images of a several storey building collapsing following the quake. The AP reported it is unclear if there were people inside.

Mexico City's Benito Juarez International Airport announced on Twitter that it has ceased operations until infrastructure reviews are complete.

The earthquake comes just two weeks after a powerful 8.1-magnitude quake struck Mexico and left nearly 100 dead. According to the AP, earlier on Tuesday (19 September) buildings across Mexico City had held preparation drills on the 1985 quake's 32nd anniversary. The 8.1 shake killed at least 9,500 and destroyed large parts of Mexico City, Reuters noted.

Part of Mexico City is built on a former lakebed, with the soil known to amplify the effects of earthquakes hundreds of miles away.