(CNN) -- Rescuers in hard hats and masks descended Wednesday on Mexico City in search of survivors after a deadly earthquake struck the region.
"The priority now is continue rescuing those who are still trapped and provide medical attention to the injured," President Enrique Peña Nieto said, calling the quake -- the second to shake Mexico in 12 days -- "a new national emergency."
The 7.1 magnitude quake turned dozens of buildings in central Mexico into dust and debris, killing at least 217 people. The majority of the deaths were in Mexico City -- which, with an urban area of more than 21 million people, is one of the most populous cities in the Western Hemisphere -- and nearby Morelos state.
The death toll comes from Luis Felipe Puente, national coordinator of civil protection for the Interior Ministry.
The country has declared three days of mourning for those killed in the quake, according to Mexico's Secretary of Public Function.
The quake also rumbled through the surrounding states of Puebla, Mexico and Morelos, officials said.
Twenty-two bodies were found in the debris of the Enrique Rebsamen school in Mexico City's Coapa district. At least 30 children were still missing as of Tuesday night, according to Peña Nieto.
"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," the President said.
Photos of missing students circulated on 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. They also visited the city's hospitals.
Late Tuesday night, 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 more injured at the Monterrey Institute of Technology campus in Mexico City, the school said.
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 asked people to stay indoors and stay away from the streets while the rescue attempts continue. Still, residents are joining forces with rescue workers to search for survivors.
'We all need to come together'
In the upscale district of Roma, one of the hardest-hit areas of Mexico City, Violeta Gaytan, was among many who fled the area 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 said.
Like others, Gaytan began to walk home. She expected it would take hours, but a man was driving around offering people rides to metro stations across the city.
Hours before Tuesday's earthquake, authorities held a citywide drill on 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.
"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 when the quake shook her apartment.
Less than two weeks ago, a magnitude 8.1 earthquake struck off Mexico's southern coast, killing at least 90 people, according to the governor of the state of Oaxaca.