The fire was first reported at about 1:20 a.m. in the East Wing of the 22-story Gateway apartment complex on Jackson Street in the city’s Financial District.
Crews rushed to the scene as residents - many of them seniors - fled the building.
"Our first arriving units saw visible flames coming out of the actual southern face of this building," said Lieutenant Jonathan Baxter with the San Francisco Fire Department. "This fire grew quickly to a 3rd alarm fire bringing over 100 firefighters and 30 pieces of firefighting apparatus to the scene."
Multiple people had to be rescued and the 11th, 12th and 13th floors were completely evacuated and residents on other floors were told to shelter-in-place.
Five people had minor injuries.
Resident Roshon Vayalil told KCBS Radio it started in his apartment and was sparked by an electric Segway scooter.
"We do know that we have the entire 11th floor listed as uninhabitable at this time, which is 22 units, and one unit on the 12th floor is uninhabitable," said Baxter.
The fire has left a large burn scar that stretches up the side of the building from the 11th floor all the way to the roof.