Investors who purchase residential hotels in San Francisco would have one year to install automatic sprinkler systems in ground-floor retail and basement spaces, under new legislation by Supervisor Aaron Peskin designed to curtail a rash of fires that have displaced low-income tenants living in those SROs.

Peskin, who represents Chinatown, home to a large number of single room occupancy hotels, said the legislation would close a loophole in a 2001 ordinance that required sprinklers in the residential portion of these buildings but not the commercial areas.

Though Peskin said he eventually would like to expand the ordinance to cover all of the city’s 300 SROs, he decided to start with a “measured” bill that would kick in when a residential hotel is sold or transferred. Upwards of 10 percent of SROs have been selling per year recently, as some speculators seek to replace low-income residents with younger tech workers and students who can afford higher rents.

“These buildings are selling for tens of millions of dollars — this is the exact time to require it, upon the sale or transfer,” said Peskin. “This is something that buyers need to understand when the are assessing the value of the property. Whether it’s a $50,000 job or a quarter-of-a-million-dollar job, the prospective purchaser needs to understand that should be part of their evaluation of the value of the building,”

The law would apply to about 300 residential hotels with 19,000 rooms, mostly concentrated in Chinatown, the Tenderloin, the Mission and South of Market.

Several SRO fires in the past two years have started in commercial parts of the buildings, including a blaze at 801 Pacific Ave. that displaced 19 older adults and nine ground-floor small businesses.

Sonui Tung, an 88-year-old woman who had lived at 801 Pacific Ave. for 30 years, said a sprinkler system in the ground-floor spaces might have saved her home.

“We didn’t know it was on fire until it was too late and we saw the smoke, because there were no sprinkler systems in the basement,” Tung said through an interpreter. “It’s been many, many months since the fire, and we still have not been able to go back home.”

Rosemary Bosque, the city’s chief housing inspector, said the legislation would send “a strong and necessary message that all prospective buyers of SROs understand how fragile these buildings are and that they are very vulnerable to fire.

“The fire department has been telling us since 2001 that if a fire starts in the commercial part of the building it could overwhelm the sprinkler system in the rest of the building,” she said.

The ordinance was before the Board of Supervisors Land Use and Transportation Committee on Monday but was held over to late November due to minor technical issues in the language that needed to be changed.

J.K. Dineen is a San Francisco Chronicle staff writer. Email: jdineen@sfchronicle.com