SAN FRANCISCO — Earthquakes are part of the California bargain, a risk that residents accept in exchange for the state’s natural beauty, sunshine and plentiful jobs. This unspoken seismic trade-off came into sharp focus last month when, for the first time, a government earthquake study included a list of potentially vulnerable high-rise buildings in San Francisco. The list includes some of the city’s most prominent hotels and office buildings.

Engineers have known about a major defect in certain steel-frame buildings since 1994, when shaking from the Northridge earthquake in Los Angeles fractured critical joints in more than 60 buildings, bringing at least one very close to collapse. The building code was rewritten to eliminate the flawed technique.

Yet nearly a quarter of a century later, California is still wrestling with what to do with the hundreds of buildings, many of them high rises, that were constructed during the more than three decades when the defective connection system was widely employed. Last year Santa Monica, which has identified more than 70 steel-frame buildings believed to have the problem, became the first city in California to order mandatory retrofits. A similar law in nearby West Hollywood comes into effect in August.

“This is an issue that structural engineers should have been dealing with continuously since the mid-1990s and we just dropped it,” said Keith Porter, an earthquake engineering expert who helped lead the United States Geological Survey study that published the list of San Francisco high rises. “We don’t know how to deal with a problem this big.”