A 7.1-magnitude earthquake struck central Mexico on Sept. 19, killing at least 200 people. It struck on the anniversary of the devastating 1985 earthquake (The Washington Post)

The day after a vicious earthquake leveled apartment buildings, damaged hospitals and flattened an elementary school, Mexicans mobilized Wednesday for a massive rescue effort, digging in a frantic search for survivors.

As the death toll reached 230 people, with 100 in Mexico City and the rest distributed in surrounding states, Mexicans confronted scenes out of parents’ worst nightmares as rescuers pulled children’s bodies from the ruins of the primary school.

But across the capital, a surge of civic spirit took hold as thousands volunteered to provide medical care, food and water or to pick through buildings destroyed by Tuesday afternoon’s quake, the second major temblor in the past month and the deadliest in three decades.

“It’s a pleasure to help,” said Rogelio Santos, a shopkeeper, on Wednesday. “We wouldn’t want to be anywhere else right now.”

In the capital, the 7.1-magnitude quake caused more than three dozen buildings to crumple and damaged hundreds more, a north-south band of destruction that scarred poor and wealthy neighborhoods alike.

“The priority continues to be rescuing people in collapsed structures and treating the wounded,” President Enrique Peña Nieto wrote on Twitter on Wednesday as he assessed damage in Mexico City and surrounding areas. Peña Nieto declared a three-day period of national mourning, the second time the government has made such a declaration this month.

The Mexican leader spoke to President Trump on Wednesday about the quake. Trump extended his condolences and offered assistance and search-and-rescue teams, which were quickly deployed, according to a statement from the White House.

Trump has had a testy relationship with the Mexican government and was criticized for not quickly contacting Peña Nieto after a deadly quake off the Pacific coast earlier this month. (Trump blamed poor cellphone reception.)

The latest quake knocked out power across 40 percent of this city of 20 million, and rescue and medical services were stretched to their limits.

Where Mexico's earthquakes have struck

Authorities reported damage to at least 22 hospitals in and around Mexico City.

One, in Morelos, collapsed completely. Some 5,000 schools were damaged by the quake.

The partially destroyed Colegio Enrique Rebsamen, a private elementary school with about 400 students in southern Mexico City, quickly became a painful symbol of the tragedy. Riveted Mexicans watched on their televisions as dramatic rescue efforts played out through Tuesday night and into the next day.

By Wednesday morning, Lucia Arista had already visited what remained of the school. She had checked the dozens of names scrawled on paper and taped to trees that identified the survivors and deceased. She had visited eight hospitals in southern Mexico City in a desperate, predawn search for her niece.

She could discover no news, good or bad, about the fate of Jessica Laura Castrejon Hernandez, a 32-year-old cleaning woman who worked at the school.

“She has disappeared,” Arista said. The mingled emotions of anxiety, dread and hope were evident in the crowd gathered around the three-story school.

After one wing collapsed Tuesday afternoon — where the kindergarten and the younger grades held classes — hundreds of rescue workers descended on the scene, including police, soldiers and marines.

“It’s like a sandwich now,” said Eduardo Corona, 55, a search-and-rescue volunteer who began working at the building Tuesday evening. “Many of those children, they didn’t make it.”

Corona saw the bodies of young children but said he could not hear sounds from survivors. Working to the rumble of generators, rescue teams used search dogs, mirrors, hoses and other methods to probe the wreckage for survivors.

Rescue worker Pedro Serrano described to the Associated Press how he tunneled into the unstable rubble to a partially collapsed classroom of the school, only to find no one alive.

“We saw some chairs and wooden tables. The next thing we saw was a leg, and then we started to move rubble, and we found a girl and two adults — a woman and a man,” he said.

Jose Pineda, 65, a hardware store worker whose children used to attend the school, held back tears as he described the situation.

“This was really, really ugly,” he said. “Everything has fallen.”

Around the security cordon, neighbors strung up sheets of paper, taped between a tree and a crosswalk sign, with names of children who survived, suffered injuries or died.

There were 31 names on two lists of the dead. At least 59 other people were listed as having gone to hospitals in the area.

“We don’t know how many children are still inside,” said Elena Villaseñor, 44, a neighbor who was helping with the notices. “They were in classes. The school was full.”

A stream of parents, grandparents and other relatives checked for the names of family members.

“It is very hard to have to point them to these two lists,” Villaseñor said, motioning to the blue and white sheets with the names of the dead children. “There aren’t words.”

The Mexican military dispatched more than 4,000 service members to Mexico City and thousands more elsewhere to help with relief operations.

Several countries made plans to send assistance. At the Mexican government’s request, the U.S. Agency for International Development will deploy a team to conduct damage assessments and help local authorities coordinate their emergency efforts, American officials said. The team will include urban search-and-rescue specialists from the Los Angeles County Fire Department.

Ordinary Mexican residents also banded together to assist in the recovery effort in any way possible: distributing water, sandwiches, tamales and coffee.

Telecom companies enabled free text messaging and provided Internet services at points across the city. Private car services, as well as public buses and subways, offered free rides.

When the traffic lights went out in the hard-hit Roma neighborhood, several private security guards and one regular civilian in a T-shirt and jeans took it upon themselves to direct traffic.

Tuesday’s earthquake occurred exactly 32 years after Mexico’s worst earthquake, which left thousands dead in 1985 and demolished entire neighborhoods in the capital.

Mexico is particularly vulnerable to earthquakes: The country is in a region where tectonic plates butt up against one another, with huge amounts of energy waiting to be unleashed.

Gabriela Martinez and Paul Imison in Mexico City and William Branigin, Andrew deGrandpre and Abby Phillip in Washington contributed to this report.

joshua.partlow@washpost.com