A crucial 5-year-old program requiring action by the owners of San Francisco’s 4,900 most earthquake-vulnerable buildings is well on its way to making the city safer, with nearly half of those structures now seismically retrofitted, city inspection officials said Thursday.

But it’s not enough, they quickly added. It won’t be enough until that number is 100 percent, and the deadline is 2020.

Meanwhile, geological experts pointed out that there is a 72 percent chance of a massive shaker on the 60-mile-long Hayward Fault or any other of the Bay Area’s big faults sometime in the next 25 years. Which really means any day now. The 150th anniversary of the last time the Hayward Fault roared, in a 6.8-magnitude quake, is coming on Oct. 21 — and experts now say its average eruption rate is every 150 years, not 140 as often reported.

Now Playing:

“We cannot emphasize enough how important it is for people to take this seriously,” San Francisco city administrator Naomi Kelly said Thursday as she joined a bevy of construction, city and quake-study officials for a tour of a vulnerable six-unit residential building being retrofitted on Russian Hill.

“We’ve made a lot of progress, but there is always a need to do more,” Kelly said.

City officials launched the Mandatory Soft Story Retrofit Program in 2013 after studying the effects of every big quake to hit the Bay Area between the 1868 Hayward Fault temblor — called the Great San Francisco Quake until the 1906 shaker exceeded it — and the 1989 Loma Prieta earthquake along the San Andreas Fault.

The program was created to compel the 4,900 owners of soft-story buildings — the ones that have several stories rising above an open garage or commercial space, deemed more susceptible than many other structures to collapse in a major quake — to seismically retrofit. More than 45 percent of the owners have completed the work, Kelly said.

More than 90 percent of those building owners overall have now filed the proper paperwork to get the retrofits done, she added, and a deadline for those remaining is coming up on Sept. 15.

As always, with unpredictable deadly earthquakes, it’s all banking on chance — the hope that the next big one won’t hit before the preparations are done. It’s a big gamble.

U.S. Geological Survey scientists say a 7.0 magnitude quake on the Hayward Fault is likely to kill at least 800 people throughout the Bay Area, leave 150,000 people homeless and cause losses of more than $1.5 trillion. At least 400 fires will ignite, potentially engulfing 50,000 homes.

For San Francisco, there is always a sense of urgency to be prepared. The 1906 quake and subsequent fire flattened much of the city, and in 1989, a chunk of the Bay Bridge collapsed and swaths of the Marina District were ruined — but the most dire predictions say things could be worse in the next big quake.

With that in mind, the city runs regular training sessions for citizen emergency response teams and maintains a website portal called SF72 (www.sf72.org) with information on that and other get-ready measures. And on Thursday, as Kelly and others toured the retrofit project, emergency crews gathered at St. Mary’s Cathedral to run a four-hour drill on creating a disaster shelter.

Aside from the lurking danger of the Hayward Fault, officials at the St. Mary’s drill pointed out that a less-likely but still-possible 7.9 quake along the San Andreas Fault would displace 23,000 people in San Francisco alone. That would bring inevitable chaos, but once the drill to house 100 refugees in the spacious church was over, officials were somewhat reassured.

“We have more than 100 facilities that (in total) can shelter 60,000 people — rec centers, churches and other buildings — so we are certainly prepared,” said Trent Rhorer, head of the San Francisco Human Services Agency, which has primary responsibility for setting up the emergency housing. “Obviously, with shelter, feeding, medical and other needs, it will be a logistical challenge, and there is always room for improvement.”

One essential factor in the preparation, he said, will be having the soft-story retrofits completed as quickly as possible.

“The more people comply, the fewer people get displaced and need shelter,” Rhorer said. “We want people to remain in their houses if they can.”

Emergency guidelines advise everyone in a big earthquake to be prepared to survive for three days with minimal or no help — and being in an intact house is a big plus. Danny Wong, whose four-story building on Clay Street was being retrofitted Thursday, said that was just one motivation for fixing up his place.

By shoring up his complex, Wong said, he is saving both his investment and the lives of his tenants. The $100,000 tab to install shear walls bolted to cement is worth it, he reckoned.

“It’s a pain in the neck, but the alternative is worse,” Wong said. “The tenants feel safer, and maybe this way my kids will be able to get the building after I’m done with it all.”

Kevin Fagan is a San Francisco Chronicle staff writer. Email: kfagan@sfchronicle.com Twitter: @KevinChron