Crews boarded up shattered windows in the scorched exterior of the North Panhandle building.
The assistant fire chief says Muni and power lines in the area contributed to the difficulty of fighting the fire.
A child was hurt, suffering a cut from glass. Neighbors were concerned the fire would spread.
"I only saw flames going up in between houses on the roof so it was pretty scary. I was about four doors down and hoping the fire didn't spread," said neighbor Yu Guo.
The fire was first reported around 8:30 p.m. Saturday night and it took crews about an hour to contain the blaze.
UPDATE Heavy fire both structures. RedCross for 50 displaced- number may climb NO INJURIES at this time pic.twitter.com/mtPZrUHDZk— San Francisco Fire (@sffdpio) February 14, 2016
UPDATE WORKING FIRE, 3RD ALARM, 573 BAKER ST, 1571 Fulton one in the same 02/13/16 20:33 making progress pic.twitter.com/ygbX7J6DLj— San Francisco Fire (@sffdpio) February 14, 2016