A fire raged through an apartment building South of Market in San Francisco on Wednesday, forcing the evacuation of dozens of people as more than 100 firefighters beat back the flames.

The fire was reported at 5:24 p.m. in a 48-unit apartment building on the 1000 block of Folsom Street, between Sixth and Seventh streets, and by the time everyone had evacuated, flames were leaping from floor to floor and heavy black smoke was billowing.

"I heard the fire engines, and my girlfriend opened the door and smelled smoke," said Tanith Nichols, 33, who rushed out of the building, leaving all his belongings. "I do computer repair work and had 10 computers in there, all my clothes, tools, some money. This is a disaster."

The blaze gutted the apartment house and spread to three other buildings, causing significant damage to a six-unit apartment behind it and minor to moderate damage to adjacent structures. Arson investigators were at the scene Wednesday night but had not determined the cause of the fire.

Red Cross volunteers had not determined how many residents lost their homes in the fire, which was declared under control at 7:30 p.m.

"It was a stubborn fire with heavy smoke," said San Francisco Fire Chief Joanne Hayes-White. "The fire building is probably a total loss. Any time you lose a building with 48 units, that affects a lot of people."

Hayes-White said four people were given oxygen at the scene, and one resident and one firefighter were taken to San Francisco General Hospital, where they were treated for smoke inhalation.

The chief could not confirm reports from several people at the scene that the fire ignited when somebody poured bourbon onto a barbecue.