SAN FRANCISCO (KCBS)–San Francisco Mayor Ed Lee signed legislation on Thursday—the 107th anniversary of the 1906 earthquake and fire—that aims to make thousands of apartments in the city safer during the next large quake.

The seismic safety measure mandates reinforcements of all the city’s soft-story apartments of at least five units, which are some of the most vulnerable structures.

READ MORE: Oakland School Board Discusses Reinstating Popular Police Mentoring Program

“Soft-story buildings are buildings where there’s a huge amount of ground floor space that is not seismically retrofitted,” Mayor Lee said before referencing the 1989 Loma Prieta Earthquake. “These are the kinds of buildings that fell apart in the Marina.”

READ MORE: Supply Chain Crisis: Shipping Industry Leaders Meet In San Francisco, Warn Backlog To Stretch Long Past Holidays

The soft-story retrofitting will cost, on average, between $60,000 to $130,000, and the new legislation will give building owners several years to complete the work. The property owners can pass the much of the costs to tenants, but Lee said he has worked with banks to help with low-cost loans.

“We are allowing the owners to pass through a hundred percent of the cost of this but they have to do it in a spread-out way, and then we are giving some support to the low income tenants,” Lee said.

Seismologists predict that a major Bay Area earthquake will happen within the next 30 years.

MORE NEWS: UPDATE: All Lanes of Westbound I-580 In Oakland Reopen Following Police Activity

(Copyright 2013 by CBS San Francisco. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)