San Francisco’s location along the San Andreas Fault means that the city is, and always will be, prone to earthquakes. But that doesn’t have to mean it’s prone to devastation. After major earthquakes in both 1906 and 1989, the city retained its status as one of America’s most important cities by learning from the past as it quickly rebuilt.

When the Great Earthquake hit on April 18, 1906, San Francisco was already a thriving business center.“The most powerful corporations in the West all had their headquarters in San Francisco,” says Robert W. Cherny, a history professor emeritus at San Francisco State University and co-author of San Francisco, 1865–1932. “San Francisco was really the economic and cultural center of much of the Western United States.”

A split from the 1906 earthquake in San Francisco.  (Credit: Underwood Archives/Getty Images)
A split from the 1906 earthquake in San Francisco. (Credit: Underwood Archives/Getty Images)

The quake, estimated at a 7.9 magnitude, caused a fire that burned for three days. By the time the conflagration had been contained, the natural disaster had killed about 3,000 people, left more than 200,000 more homeless and destroyed more than 28,000 buildings and 500 city blocks, according to the Library of Congress.

The fire came just a year after the city had commissioned an architect to design a new municipal plan. That architect, Daniel Burnham, came up with a design to reorganize the city’s streets to make them more scenic, Cherny says. But after the earthquake, San Francisco feared that the plan would take too long to implement alongside its necessary recovery efforts. After all, Los Angeles was growing rapidly, threatening to overtake San Francisco in importance.

“In the end, the demand to rebuild quickly took precedence over the demand for, essentially, beautification,” he says. “And so in their haste to rebuild, they simply scrapped that plan and instead pretty much rebuilt all the streets where the streets had been before, and rebuilt much of the downtown in the same place it had been before.”

Horse drawn wagons travel past the rubble of stone buildings on Market Street after the 1906 San Francisco earthquake and fire. (Credit: Bettmann/Getty Images)
Horse drawn wagons travel past the rubble of stone buildings on Market Street after the 1906 San Francisco earthquake and fire. (Credit: Bettmann/Getty Images)

The swiftness with which the city was rebuilt meant it continued to be an important business center. By 1915, architects and engineers had not only brought the city back to its pre-1906 status, they’d also constructed new buildings for the city’s World’s Fair, the Panama–Pacific International Exposition.

There were, however, some improvements made with future disasters in mind—but not necessarily earthquakes.

Conevery Bolton Valencius, a history professor at Boston College who has written about U.S. earthquakes, says that fire safety measures were prioritized over earthquake-proofing because the city didn’t want to admit how likely future earthquake were, fearing it would be bad for business. Cherny, in contrast, says that engineers and architects did take earthquakes into account by rebuilding some structures with reinforced masonry. But regardless of how many structural improvements were made, the city’s building codes were slower to catch up and mandate such improvements.

Raging fire over San Francisco after the 1906 earthquake. (Credit: Bettmann/Getty Images)
Raging fire over San Francisco after the 1906 earthquake. (Credit: Bettmann/Getty Images)

When the next big quake struck on October 17, 1989, the city was again enjoying a period of financial success, albeit one that came at the expense of many long-term residents. The city was in the midst of a building boom, known as “Manhattanization,” which had driven lower-income residents out, and brought yuppies and skyscrapers in. In the midst of this came the Loma Prieta earthquake, which struck with a 6.9 magnitude, killed 67 and injured more than 3,000.

Some of the most significant damage was to the Embarcadero Freeway. According to Cheney, this highway had long been considered an eyesore that divided the waterfront from downtown. Rather than rebuild it, the city put a surface street in its place so that the waterfront was no longer blocked off—a decision that helped bring more development to the area, Cherny says.

The remains of the Cypress Freeway following the Loma Prieta Earthquake of 1989. (Credit: Jim Sugar/Corbis via Getty Images)
The remains of the Cypress Freeway following the Loma Prieta Earthquake of 1989. (Credit: Jim Sugar/Corbis via Getty Images)

Although the damage and death toll were less than the 1906 quake, the Loma Prieta—like its predecessor—did the most harm to structures built on soft soil, and buildings with unreinforced masonry.

“The areas that were most damaged were the same ones that had been most damaged in ‘06,” Valencius says. “After that, San Francisco strengthened its seismic code and made some changes that would apply to structures already standing, as well as new construction.” Valencius credits these decisions with making the city much more prepared for future seismic events.

A Marina District apartment building that was heavily damaged in the 1989 San Francisco earthquake. (Credit: Roger Ressmeyer/Corbis/VCG via Getty Images)
A Marina District apartment building that was heavily damaged in the 1989 San Francisco earthquake. (Credit: Roger Ressmeyer/Corbis/VCG via Getty Images)

“Every major earthquake has been a learning experience,” Cherny says, noting that structural improvements and designs are continuously happening in San Francisco. Both Cherny and Valencius credit the 1906 quake as the dawn of American earthquake science, with seismologists’ careful study of it contributing much to what we know about earthquakes today.

“When we are brave about seeing the conclusions that scientists tell us about risk, then we can plan for resilient buildings and communities that can recover,” Valencius says.