A possible arson suspect has been detained, the Los Angeles Fire Department said.
Firefighters first responded to the two-story building in the city's Westlake district after a 911 call around 7 p.m. Monday, the Los Angeles Fire Department said. When firefighters arrived, the building was showing heavy smoke and flames across its interior and roof.
Three people were rescued from second-story windows by firefighters, and hose lines were deployed to keep the fire from spreading to neighboring buildings.
Over the next two hours and a half hours, 145 firefighters responded to the fire.
The building was vacant of any businesses, and it appeared the five victims were homeless, fire officials said.