The 8.9-magnitude earthquake and powerful tsunami that struck off Japan’s northeastern coast on Friday flooded towns and swept away buildings. The death toll is expected to exceed 1,000 and hundreds more are missing, according to the Kyodo news agency.

Yet some wonder whether the devastation could have been even worse had Japan's engineering not been so sophisticated and its building codes so rigorous.

The pivotal moment for Japanese engineering came in 1995, when a 7.3-magnitude earthquake hit Kobe, Japan and killed 6,500 people.

According to David Pilling at The Financial Times, around 5,000 people died within moments of the quake, "crushed by buildings that Japanese engineers were amazed--and ashamed--to see crumple like cards ... The Hanshin expressway, a supposed showcase of modern engineering, also collapsed." Many of the thousands of buildings that fell, Pilling explains, were constructed before 1981, when building standards were lower.

The Kobe tragedy, says The Telegraph's Peter Foster, compelled Japanese officials to tighten building regulations for residential offices and transportation infrastructure. Engineers made buildings  "earthquake proof" by outfitting them with "deep foundation and massive shock absorbers that dampen seismic energy," and by enabling the bases of buildings to move "semi-independently to its superstructure, reducing the shaking caused by a quake." Skyscrapers now sway during an earthquake but don’t collapse, Foster says, and that helps explain why damage to buildings in Tokyo was kept to a minimum this time around.

Japan, which is prone to earthquakes, also spent the decades after the Kobe quake securing coastal communities. They built concrete seawalls, equipped ports with raised platforms, and even developed networks of sensors in some towns to sound alarms in homes and automatically shut floodgates when earthquakes hit. Had any other populous country experienced an earthquake like Japan's, Norimtsu Onishi at The New York Times says, "tens of thousands of people might already be counted among the dead."

The New Yorker's Amy Davidson, meanwhile, recalls Haiti's recent 7.0-magnitude earthquake, which was less powerful than Japan's but decimated the country's vulnerable infrastructure and killed hundreds of thousands of people. "The scenes from Japan are awful," she writes, but comparing the disasters in Japan and Haiti provides "evidence of why earthquakes are political and economic, almost as much as natural, experiences." Buildings in Tokyo swayed, other water-drenched structures collapsed, and cities in northern Japan suffered more than the capital, Davidson writes, but Tokyo "hasn’t been flattened in anything like the way Port au Prince was."

In a sign of Tokyo's reslience, images are now surfacing of the Tokyo Tower, re-lit and relatively unscathed.

Update

Check out this video of Japanese skyscrapers swaying, courtesy of Leandro Oliva.