The fire at 1571 Fulton and 573 Baker streets was contained at 9:27 p.m.
No injuries have been reported but the fire has displaced more than 10 people, according to by fire officials.
The fire was first reported by firefighters on Twitter at 8:22 p.m. By 8:59 p.m. crews had held the blaze to three alarms.
Fire officials are warning people to close windows and turn on fans if they live near the intersection of Fulton and Baker streets because of smoke from the fire.
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