San Francisco voters overwhelmingly approved a $400 million earthquake safety bond measure Tuesday to pay for seismic upgrades on a number of city buildings that house emergency responders - from police officers to firefighters to the medical examiner.

The measure, Proposition A, is the second of a planned three general obligation bond measures to ensure that city buildings can withstand a major earthquake. Voters in 2010 approved the first one, worth $412 million.

Seventy-nine percent of voters supported the bond measure, with all precincts reporting.

The U.S. Geological Survey says there is a 63 percent chance of an earthquake measuring at least magnitude 6.7 striking the Bay Area in the next 25 years.

Mayor Ed Lee introduced Prop. A and won unanimous support from the Board of Supervisors to place it on the ballot. He said the huge fire that ripped through a Mission Bay apartment building in March showed the importance of the city's emergency firefighting water system.

"A five-alarm fire thankfully did not spread and resulted in no serious injuries, because we were able to tap into the city's high-pressure emergency firefighting water system," Lee said. "In addition to upgrading our emergency firefighting water system, this bond will also seismically strengthen neighborhood fire and police stations, so that our first responders will be there for us when we need them most."

Proponents of Prop. A pointed out that most of the destruction resulting from the 1906 earthquake stemmed not from the shaking, but from the fires that erupted afterward. Ensuring that police officers, firefighters and paramedics can respond quickly, rather than being stuck in collapsed buildings themselves, is essential, bond supporters said.

The measure will provide $30 million to renovate or replace up to nine of the city's 10 district police stations, $85 million to upgrade some neighborhood fire stations, and $55 million to repair and expand the emergency firefighting water system. The rest will be used to move the headquarters of the motorcycle police, crime lab and medical examiner's office so they're in seismically safe structures equipped with modern technology.

Judicial race

Also on the ballot was an unusual three-way race for an open seat on the San Francisco Superior Court that pitted prosecutor Kimberly Williams against civil rights attorney Daniel Flores and mediator and former police Commissioner Carol Kingsley.

Judge Charlotte Woolard, first appointed to the Superior Court in 1995 by Gov. Pete Wilson, opted not to run again this year. Flores won with 45 percent of the vote.