The two-alarm fire was reported at 12:13 a.m. in two residential units at 1547 and 1549 Powell St., San Francisco fire Lt. Mindy Talmadge said.
Firefighters were able to extinguish the blaze by 12:55 a.m., Talmadge said.
Two men and a woman, all in their 80s, were taken to St. Francis Memorial Hospital. One had a foot laceration, while the other two were just taken to the hospital as a precautionary measure, Talmadge said.
The fire displaced a total of 13 people, including five children, she said. Residents in neighboring buildings evacuated while firefighters battled the blaze but were able to return to their homes.
The fire caused "quite extensive" damage that totaled about $1.5 million to the building's structure and contents, Talmadge said.
She said firefighters extinguished the blaze quickly considering the location of the building, which was surrounded by other buildings in the middle of the block and only accessible by narrow alleyways.
The fire is not considered suspicious and is "most likely electrical in nature," Talmadge said.