The fire was reported at about 12:20 p.m. at the Kinney Hotel, a four-story, single-room occupancy hotel at 410 Eddy St., San Francisco fire Lt. Mindy Talmadge said.
Talmadge said it appears the fire started near a light well on the second floor and burned behind the metal sheeting that lines the light well, spreading through the walls to the third and fourth floors.
Firefighters contained the blaze quickly and had it under control by 12:45 p.m.
To stop the spread of flames, firefighters had to remove the metal lining from the light well, Talmadge said.
"They had to open up all the walls from the second floor up," she said.
There was also "quite a bit" of water damage to the building, she said.
No injuries were reported. Talmadge did not know how many residents were displaced but said the American Red Cross has been called to assist the fire victims.
The cause of the fire remains under investigation.