A man walks out of the door frame of a building that collapsed after an earthquake, in the Condesa neighborhood of Mexico City, Tuesday, Sept. 19, 2017. Throughout Mexico City, rescuer workers and residents dug through the rubble of collapsed buildings seeking survivors following a 7.1 magnitude quake. (AP Photo/Marco Ugarte)

A man walks out of the door frame of a building that collapsed after an earthquake, in the Condesa neighborhood of Mexico City, Tuesday, Sept. 19, 2017. Throughout Mexico City, rescuer workers and residents dug through the rubble of collapsed buildings seeking survivors following a 7.1 magnitude quake. (AP Photo/Marco Ugarte)

MEXICO CITY (AP) — A powerful earthquake shook central Mexico on Tuesday, collapsing buildings in plumes of dust and killing at least 226 people. Thousands fled into the streets in panic, and many stayed to help rescue those trapped.

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.

ADVERTISEMENT

Hours after the magnitude 7.1 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.

The quake is the deadliest in Mexico since a 1985 quake on the same date killed thousands. It came less than two weeks after another powerful quake caused 90 deaths in the country’s south.

Luis Felipe Puente, head of the national Civil Defense agency, reported early Wednesday that the confirmed death toll had increased to 226.

His tweet said 117 dead had been counted in Mexico City and 55 in Morelos state, which is just south of the capital. It said 39 were known dead in Puebla state, where the quake was centered. Twelve deaths were listed in the State of Mexico, which surrounds Mexico City on three sides, and three in Guerrero state.

The federal government declared a state of disaster in Mexico City, freeing up emergency funds. President Enrique Pena Nieto said he had ordered all hospitals to open their doors to the injured.

ADVERTISEMENT

Mancera, the Mexico City mayor, said 50 to 60 people were rescued alive by citizens and emergency workers in the capital. Authorities said at least 70 people in the capital had been hospitalized for injuries.

The federal interior minister, Miguel Angel Osorio Chong, said authorities had reports of people possibly still being trapped in collapsed buildings. He said search efforts were slow because of the fragility of rubble.

“It has to be done very carefully,” he said. And “time is against us.”

At one site, reporters saw onlookers cheer as a woman was pulled from the rubble. Rescuers immediately called for silence so they could listen for others who might be trapped.

Mariana Morales, a 26-year-old nutritionist, was one of many who spontaneously participated in rescue efforts.

She wore a paper face mask and her hands were still dusty from having joined a rescue brigade to clear rubble from a building that fell in a cloud of dust before her eyes, about 15 minutes after the quake.

Morales said she was in a taxi when the quake struck, and she got out and sat on a sidewalk to try to recover from the scare. Then, just a few yards away, the three-story building fell.

A dust-covered Carlos Mendoza, 30, said that he and other volunteers had been able to pull two people alive from the ruins of a collapsed apartment building after three hours of effort.

“We saw this and came to help,” he said. “It’s ugly, very ugly.”

Alma Gonzalez was in her fourth floor apartment in the Roma neighborhood when the quake pancaked the ground floor of her building, leaving her no way out — until neighbors set up a ladder on their roof and helped her slide out a side window.

Gala Dluzhynska was taking a class with 11 other women on the second floor of a building on trendy Alvaro Obregon street when the quake struck and window and ceiling panels fell as the building began to tear apart.

She said she fell in the stairs and people began to walk over her, before someone finally pulled her up.

“There were no stairs anymore. There were rocks,” she said.

They reached the bottom only to find it barred. A security guard finally came and unlocked it.

The quake sent people throughout the city fleeing from homes and offices, and many people remained in the streets for hours, fearful of returning to the structures.

Alarms blared and traffic stopped around the Angel of Independence monument on the iconic Reforma Avenue.

Electricity and cellphone service was interrupted in many areas and traffic was snarled as signal lights went dark.

The U.S. Geological Survey said the magnitude 7.1 quake hit at 1:14 p.m. (2:15 p.m. EDT) and was centered near the Puebla state town of Raboso, about 76 miles (123 kilometers) southeast of Mexico City.

Puebla Gov. Tony Gali tweeted there were damaged buildings in the city of Cholula, including collapsed church steeples.

In Jojutla, a town in neighboring Morelos state, the town hall, a church and other buildings tumbled down, and 12 people were reported killed.

The Instituto Morelos secondary school partly collapsed in Jojutla, but school director Adelina Anzures said the earthquake drill that the school held in the morning was a boon when the real thing hit just two hours later.

“I told them that it was not a game, that we should be prepared,” Anzures said of the drill. When the shaking began, children and teachers filed out rapidly and no one was hurt, she said. “It fell and everything inside was damaged.”

Earlier in the day, workplaces across Mexico City held earthquake readiness drills on the anniversary of the 1985 quake, a magnitude 8.0 shake that killed thousands of people and devastated large parts of the capital.

In that tragedy, too, ordinary citizens played a crucial role in rescue efforts that overwhelmed officials.

Market stall vendor Edith Lopez, 25, said she was in a taxi a few blocks away when the quake struck Tuesday. She said she saw glass bursting out of the windows of some buildings. She was anxiously trying to locate her children, whom she had left in the care of her disabled mother.

Local media broadcast video of whitecap waves churning the city’s normally placid canals of Xochimilco as boats bobbed up and down.

Mexico City’s international airport suspended operations and was checking facilities for damage.

Much of Mexico City is built on former lakebed, and the soil can amplify the effects of earthquakes centered hundreds of miles away.

The new quake appeared to be unrelated to the magnitude 8.1 temblor that hit Sept. 7 off Mexico’s southern coast and also was felt strongly in the capital.

U.S. Geological Survey seismologist Paul Earle noted the epicenters of the two quakes were 400 miles (650 kilometers) apart and said most aftershocks are within (60 miles) 100 kilometers.

There have been 19 earthquakes of magnitude 6.5 or larger within 150 miles (250 kilometers) of Tuesday’s quake over the past century, Earle said.

Earth usually has about 15 to 20 earthquakes this size or larger each year, Earle said.

Initial calculations showed that more than 30 million people would have felt moderate shaking from Tuesday’s quake.