SAN FRANCISCO (CBS SF) — Two people suffered burns leaving one of the victims in critical condition after a three-alarm fire damaged three residential buildings in San Francisco’s Richmond District early Friday, authorities said.

San Francisco officials said a third person was also treated for a medical condition triggered by the blaze and a firefighter cut his hand while battling the fire.

READ MORE: Rescue Crews Busy On San Francisco Bay Area Beaches During Tsunami Surge

One of the injured suffered burns to the chest and was taken to the hospital in critical condition. The other victim suffered burns to their hands and was treated at the scene.

Crews raced to fight the fire at 453 23rd Ave. after receiving 911 calls reporting the blaze around 2 a.m.

Arriving firefighters were greeted by massive flames roaring out of the roof of one of the buildings with the threat of spreading to neighboring structures in the densely populated neighborhood. The blaze was quickly upgraded to three alarms.

READ MORE: French Bulldog Stolen at Gunpoint in Castro Valley

When firefighters entered the burning structure, they were confronted by hallways and stairs cluttered by hoarded possessions.

Three men suffered injuries while 25 to 30 others were able to safely escape the flames. A cat was also rescued from the burning building.

25 residents were also displaced.

Nearly 100 firefighters worked to control the blaze. It was reported under control by 4 a.m.

MORE NEWS: Thieves Target License Plates in San Francisco; Rack Up Parking Tickets

The cause of the fire was under investigation.