This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

MEXICO CITY — Rescuers searched for survivors through the night after Tuesday’s powerful earthquake shook Mexico City and surrounding states, killing scores and leaving many trapped under collapsed buildings.

At least 217 people died in Mexico City — the country’s capital — and in the states of Puebla, Mexico and Morelos, officials said. Previously, authorities had said that as many as 248 people had died. The death toll was later revised.

President Enrique Peña Nieto said 22 bodies were found in the debris of an elementary school in Mexico City that collapsed due to the earthquake.

“The priority now is continue rescuing those who are still trapped and provide medical attention to the injured,” said President Enrique Peña Nieto in a video statement early Wednesday.

Dozens of buildings in central Mexico turned into plumes of dust and debris killing at least 216 people in Mexico City and the surrounding states of Puebla, Mexico and Morelos when a powerful 7.1-magnitude earthquake struck Tuesday, officials said.

One of those buildings was the Enrique Rebsamen school in Mexico City’s Coapa district, where 22 bodies have been recovered.

“Unfortunately many people have lost their lives, including girls and boys in schools, buildings and houses. I want to express my condolences to those who lost a family member or a loved one. Mexico shares your grief,” Peña Nieto said.

Photos of missing students circulated social media while dozens of parents waited outside the school hoping to find them. The family of 7-year-old Jose Eduardo Huerta Rodriguez looked for hours through handwritten lists with names of those who had been rescued and visited the city’s hospitals.

But around 10 p.m. (local time), a family member who had stayed outside the school called Jose’s mother.

“He was still inside the school, and he was dead when they rescued him,” his aunt Paola Rodriguez told CNN.

About a mile away, four people were killed and 40 injured at The Monterrey Institute of Technology campus in Mexico City, the school said.

The earthquake has left a devastating impact in the region. An unaccounted number of people are staying at shelters around the city after losing their homes. Schools have closed indefinitely and millions remain without power.

Peña Nieto has asked people to stay indoors and stay away from the streets while the rescue attempts continue.

‘We all need to come together’

In the upscale neighborhood of Roma, one of the hardest hit areas in the city, Violeta Gaytan, was among many who fled the area on Tuesday to get away from damaged buildings and a strong smell of gas.

“There was a lot of people screaming, children everywhere. I saw people calling out for doctors and a lot of dust,” the publicist in Mexico City said.

Like others in the city, Gaytan began to walk home. She expected it would take her hours but a man was driving around offering people rides to metro stations across the city.

A couple of hours before Tuesday’s earthquake, authorities held a city-wide drill in the anniversary of an earthquake that killed an estimated 9,500 people in and around Mexico City in 1985, one the country’s worst natural disasters in recent memory.

“This is one of those moments where we all need to come together,” said Dorothy Munoz after she grabbed her dogs and raced to the street after her apartment was shaken by the earthquake.

Less than two weeks ago, a magnitude-8.1 earthquake struck off the southern coast of the country, killing at least 90, according to the governor of the state of Oaxaca.