Even in one of the most earthquake-prone cities in the world, Peniley Ramirez never felt in danger inside her apartment. The seven-story building in the Roma neighborhood had survived the devastating Mexico City quake of 1985, which killed thousands.
"People said it was perfect during '85, there was no damage at all, so we always felt safe," she said.
But after Tuesday's earthquake, neighbors had to break down her door with a pickax to get her out.
The building was leaning and in danger of collapsing. Still, on Wednesday morning her husband and volunteers managed to retrieve paintings, toys, clothes and the television.
"I don't know if I want to live in the Tower of Pisa," said Ramirez, a reporter for Univision.
It was a widespread belief in Mexico City: If your house or apartment building was still standing after Sept. 19, 1985 — perhaps the most infamous date in the city's modern history — it would withstand the next big quake. That theory was put to the test this week. It was wrong.
Experts have long understood that history is an unreliable guide when it comes to how a building will fare in an earthquake, whether in Mexico, California or any other place criss-crossed by fault lines.
"This earthquake proved it: Doing well in one earthquake doesn't mean you'll do well in the next earthquake," said Kit Miyamoto, a member of the California Seismic Safety Commission and chief executive of the structural engineering firm Miyamoto International. "Because every earthquake is different. And every building responds differently."
Although Tuesday's magnitude 7.1 earthquake was far weaker than the magnitude 8 temblor of 1985, its epicenter was much closer to Mexico City — 80 miles away, compared with 250.
That, experts said, largely explains the damage pattern emerging in preliminary reports: shorter, older buildings that were spared in 1985 were especially vulnerable this time, while taller buildings fared much better than they did a generation ago.
In videos taken during the earthquake and moments after, dust clouds hover over shorter, older buildings while taller ones sway violently but remain standing. The school south of downtown where at least 25 children were killed was three stories.
Why shorter and taller buildings can react differently in the same earthquake is a matter of physics — like a wineglass that shatters when subjected to the vibration of a particular musical note.
Mega-earthquakes, such as the one in 1985, are caused by extremely long faults. They produce low, booming shaking frequencies that can travel for vast distances — think of the bass beat you might hear from a distant rave — and produce the sensation of rolling motion, like the kind you might feel on a boat. Tall buildings are particularly vulnerable to this kind of motion.
That is particularly true in Mexico City, which sits on an ancient lake bed. Its soft soils amplify the shaking from an earthquake by 100 times, said Lucy Jones, a seismologist and former science advisor for risk reduction at the U.S. Geological Survey.
Moreover, the lake bed is believed to have a natural resonant frequency that was activated in the 1985 earthquake and targets buildings that are between five and 20 stories — the very buildings that suffered the most damage in that disaster, which killed at least 4,200 people and by some estimates many more.
Something similar happened in the 2015 magnitude 7.8 Nepal earthquake, in which Katmandu, which also sits on an ancient lake bed, saw its tall buildings suffer damage, while its short buildings performed far better.
By contrast, short buildings are most vulnerable when they are close to the epicenter, which produces a shaking often described as herky-jerky, or having sudden, intense up-and-down or side-to-side movement. That high-frequency movement is not felt farther away from an earthquake's source.
The 1985 quake therefore spared smaller buildings, many of them made of brick or brittle concrete that was long a staple of construction in Mexico, without much steel reinforcement that newer building codes require to protect against earthquakes.
This time the owners and occupants of some of those buildings were not so fortunate.
"The buildings that collapsed — most of them were very old buildings. Most of the buildings are maybe five, six stories," said Guillermo Lozano, an aid worker with the humanitarian organization World Vision Mexico.
"There's a feeling that this city after 1985 was not vulnerable," he said. "And that's true in one way, because the new buildings, most of the new buildings were not affected. They're OK. They had good protocols. People knew what to do. But what about the old buildings?"
Keith Dannemiller, a freelance photographer who has lived in Mexico for decades, said he had long subscribed to the theory that pre-1985 structures were battle-tested.
But in recent years, he had started to wonder whether the smaller quakes that are common here were taking a toll on structures such as the six-story apartment building where he lives with his wife in the stylish — and aging — Condesa neighborhood.
Built in 1968, it suffered serious damage Tuesday, raining chunks of concrete and brick inside his apartment.
If the building proves uninhabitable, he said, he might look into renting an apartment constructed in the 1990s or later.
"Maybe the Condesa has lost a little glimmer and shine because of this," he said.
Nearby in the Roma neighborhood, Mariana Dieguez, a 21-year-old dental student, stood outside a commercial building that had collapsed and killed a child on the sidewalk.
"Most of the ones falling are older," she said. "The ones built after '85 have done well."
Constructed in the 1950s, the four-story building is now a mountain of concrete chunks and steel.
Dieguez had come to help in the rescue effort, joining a crowd of volunteers equipped with shovels, masks and gloves. But soldiers stationed there said it was too dangerous and turned them away, drawing angry shouts.
One of the volunteers, 25-year-old Ismael Alejandro Monroy Montesinos, explained why he had come to help: "This happened to our parents and now it's happening to today's generation."
Special correspondent Laura Tillman reported from Mexico City and Times staff writer Lin from San Francisco.