Tens of thousands of San Francisco homes and businesses are built in a way that will probably cause them to collapse in the next big earthquake, yet city leaders and building officials have largely ignored the danger for decades.

The vulnerable buildings are often the classic San Francisco apartment building with a store or restaurant on the first floor, or the Sunset District home built over a garage.

The "soft-story" buildings feature a space - a glass window or a garage door - on the ground floor where a wall would ordinarily be, making their wood frames prone to twisting and buckling in an earthquake.

San Francisco has more of the buildings than any other Bay Area city, and they are made more precarious by neighborhoods perched on unstable soil - sand and dirt shoveled into former lagoons, creeks, lakes and the bay. The structures also house most of the city's affordable rental units, which are critical to economic diversity.

So far, the quakes to hit the city over the past century have only hinted at the danger posed by these buildings, many of which have been constructed over the past several decades.

The destruction in the Marina district after the 1989 Loma Prieta quake - garages caved down on sidewalks, splintered wood, cracked stucco, and brown columns of smoke rising from burning buildings - could easily be multiplied 100 times by a closer quake on the Hayward or San Andreas faults, according to engineers who have studied the danger. Loma Prieta hit about 60 miles south of the city.

"Almost every apartment building in the Sunset District and the Richmond District with ground-floor grocery stores and shops. ... They're toast!" said Pat Buscovich, a structural engineer who has sat on numerous city seismic safety panels. "In the Marina, (the buildings) rolled over and killed cars. If they roll over in other neighborhoods, which they will, they'll kill a lot of people."

There is widespread agreement that the potential destruction - deaths, loss of housing and damage to businesses - would be enormous in San Francisco because of the prevalence of soft-story buildings. Yet the cost to seismically stabilize them can be as low as $20,000 for a five-unit apartment building.

Nevertheless, city officials have shown a lack urgency when it comes to retrofitting the city's structures. In one example, Mayor Gavin Newsom and city Assessor Phil Ting proposed in December taking some public loan money available for retrofitting brick buildings and using it instead to subsidize the installation of solar panels. Ultimately, another pot of money was used for a similar solar program.

Buildings' toll in Northridge

San Francisco building-safety experts wonder why it's taking so long for the city to craft a soft-story building retrofit plan. The buildings were blamed for many of the 72 deaths and 9,000 injuries after the magnitude 6.7 Northridge earthquake, which caused an estimated $25 billion damage in 1994. One soft-story apartment building collapsed and killed 16 people.

In April, scientists calculated that there is a 63 percent chance a magnitude 6.7 or greater quake will hit on a Bay Area fault in the next 30 years.

Soft-story buildings erected on street corners and unstable soil are considered to be the most susceptible to collapse, but there has never been a city order to retrofit even those structures. In May, after China's magnitude 8 earthquake, Newsom talked about requiring property owners to address the issue, but he has not put forward a formal plan or ordinance. His spokesman said last week that the mayor had recently asked to be briefed on the issue.

"It's alarming how unprepared we are," said Debra Walker, a member of the city Building Inspection Commission. "We haven't been doing the work we need to be doing, and it scares me."

Estimated deaths, costs

Walker and concerned engineers and civic groups recently persuaded the city's Building Inspection Department to restart a study of various city building types, attempting to estimate the number of deaths and the costs resulting from a major earthquake.

The study, which began in 2000 before it was abruptly abandoned three years later, showed that soft-story buildings would cause the overwhelming majority of damage and loss of housing in a major earthquake centered near the city.

Because the buildings also house most of San Francisco's 180,000 rent-controlled apartments, the destruction could profoundly affect the city's housing market.

Work on the report was shelved in 2003 because of a murky combination of bureaucratic inertia and politics, according to Walker and others involved.

The hope among some engineers is that the completed study will prompt a comprehensive retrofit program for at least the most vulnerable structures. But history indicates that, despite the real threat that a major earthquake could hit San Francisco at any moment, progress will be slow.

A notable example is the decadeslong slog to stabilize unreinforced brick buildings. The buildings were known to be dangerous since even before many brick schoolhouses crumbled in the 1933 Long Beach earthquake. But San Francisco didn't begin to require retrofits on those masonry buildings until 1992. Still, about 150 brick buildings haven't been fixed.

Learning from other quakes

The recent earthquake in Sichuan province, China, where 87,000 people are estimated to be dead or missing, is a cautionary tale. News reports after that disaster indicate that government officials did little to stabilize structures they knew could collapse.

While much of downtown San Francisco also sits on landfill, its buildings are considered safer than most of the city's housing stock. Whereas many downtown structures have been retrofitted or engineered for earthquake resistance, most apartment buildings and single-family homes have not.

In 1989, the Marina district was the site of at least 124 destroyed or damaged buildings and three deaths. A temblor centered closer to San Francisco could cause that sort of damage across much more of the city, from the Sunset and Richmond districts to the Mission and South of Market neighborhoods.

Structural engineer David Bonowitz conducted a rough survey that showed 180,000 San Franciscans live in about 5,700 soft-story residential apartment buildings with three or more units. That doesn't include the tens of thousands of soft-story homes in the Richmond and Sunset districts, he said.

Bonowitz said the city needs to come up with a retrofit plan soon because a high percentage of the buildings would be uninhabitable after a major earthquake.

The city has estimated that 50,000 to 60,000 people would need emergency housing after a big quake, and there are plans to provide short-term shelters in churches and community halls. But Bonowitz said the city should prepare for far more than 60,000 displaced residents, given what is known about soft-story buildings.

"This is a city of renters, and they don't have a lot of control over whether their buildings are safe and don't have a lot of alternatives," Bonowitz said.

Uncertain future for renters

Likewise, many owners of apartment buildings have little incentive to retrofit buildings when, in most cases, they can't pass all the costs on to residents.

A legal quirk makes renters' future even more uncertain in the event of a big earthquake, because owners of rent-controlled dwellings destroyed in a quake wouldn't have to abide by rent-control laws once they rebuild.

Apart from the human toll and economic damage these buildings pose, the city's chief building inspector says the destruction of soft-story buildings also could drastically alter the architectural charm and feel of San Francisco's historic neighborhoods.

"The soft-story corner buildings tend to have neighborhood services and small businesses and housing," Laurence Kornfield said. "Their effect on the city (if they were damaged) could be extreme."

City voters already have approved bond money for retrofitting brick buildings, but unless voters change that law, the remaining $320 million cannot be used to stabilize soft-story buildings.

Bonds, rebates suggested

Engineers and building commissioners have suggested requiring retrofits of the buildings and also allowing property owners to use public bond money or giving them rebates on property taxes.

Other Bay Area cities have taken steps to fix the problem.

In 2007, Fremont approved an ordinance requiring the retrofitting of all soft-story apartment buildings.

Berkeley requires owners to post warning signs about their soft-story buildings' earthquake danger and submit plans to stabilize them. Building officials there expect to draft a retrofit ordinance by the end of the year that will require property owners to comply with seismic safety codes.

"We've been very impressed that people have started to do the retrofitting after they were alerted to the problem," said Dan Lambert, Berkeley's building mitigation manager. "People usually don't like the city to tell them what to do, but in this case they've been very receptive."

Buildings violate law: Despite a 1986 state order, about 150 brick structures in S.F. have not been retrofitted. A14