SAN FRANCISCO (CBS SF) — Hours before a 5-alarm blaze erupted, roaring through nearly a block of commercial buildings, a San Francisco fire crew extinguished at late-night mattress fire at a homeless encampment in the neighborhood, officials confirmed Wednesday.

San Francisco Fire spokesman Lt. Jonathan Baxter said drawing any connection between the two fires would be mere speculation at this point.

READ MORE: Asian American Attacks: San Francisco Shop Owner Says Teen Thief Pepper Sprayed Her

Fire investigators remained on the scene of the massive blaze, trying to determine where the fire began. Their efforts were being slowed by flames and smoldering wreckage still among the large piles of debris left over from what were two commercial buildings.

Baxter said two buildings were completely destroyed in the early Tuesday morning blaze. Four others were severely damage with one or two of those facing demolition. Other adjacent buildings as well were scorched by the intense flames.

Several firefighters — three engines and three truck companies — remained on the scene, extinguishing hot spots.

“We still have flames and smoke within the footprint of the fire,” Baxter said.

The mattress fire was reported at 11:30 p.m. Monday in a homeless encampment behind the block of buildings that caught fire. A fire crew was dispatched and the blaze extinguished.

“We do know and are aware there was a mattress fire to the rear of 140 14th Street, which would be on Erie St,” Baxter told reporters. “At this time the fire investigation task force is looking at that incident. They were at that incident last night confirming that blaze had been extinguished and out. And they will follow up to see if there is a nexus (connection) to that incident and this (the 5-alarm fire) incident…At this point to say there is would merely be speculative.”

A firefighter injured battling the blaze was recovering at home, Baxter said, but would require followup care.

Baxter also shot down two rumors that have been circulating on social media since the fire — a building owned by the San Francisco Sheriff’s Department and damaged during the blaze was not the target of an arsonist.

He also said PG&E lines did not ignite the blaze. They were downed as a result of the fire as were transformers.

The fire was first reported at 6:30 a.m. in a block of commercial buildings on the border of the Mission and SOMA neighborhoods. By 7 a.m. firefighters tweeted that a second alarm had been called as the fire began spreading along 100 block of 13th Street.

READ MORE: Santa Clara Wins NCAA Women's Soccer Championship, Topping FSU In Penalty Kick Shootout

“I was on the second floor, so I was looking right at it,” says John Voldal. “And it was crazy. Column of black smoke. It was apocalyptic.”

Right outside Voldal’s window was a column of smoke that towered over the city, coming from a fire that was quickly on its way to five alarms.

“Fire department was incredibly responsive,” says another neighbor. “It appeared to be out of control from the beginning.”

As massive flames engulfed the building near Folsom and 13th St., firefighters elevated the response to five alarms by 7:25 a.m.

“I got here on the second alarm,” said deputy fire chief Victor Wyrsch. “It was fully involved, the fire building, and rapidly moving into the second building — a rapid spread,” he said. “We had huge problems on the Erie St. side with power lines. We actually had transformers falling onto the ground. I had to back everyone away.”

As the blaze jumped from building to building, firefighters were able to halt it before it damaged a commercial structure owned by the San Francisco Sheriff’s Department and containing boxes of live ammo in the basement.

Wyrsch said there was a deputy on duty inside the building as the fire approached.

“That was the first building I went inside to check to make sure everything was okay,” the deputy chief said. “There was a sheriff deputy inside. I asked him to get his most important equipment out. They had a lot of ammo in the basement. So I said get all the ammo you can out — get everything out.”

ALSO READ: Firefighters Forced To Tap Into San Francisco Water Reserves To Fight 5-Alarm Blaze

Wyrsh had 160 firefighters and 60 pieces of equipment on hand. But what he needed more of was water, once crews drew past the capacity of neighborhood hydrants.

“We had to use our high-pressure system, we didn’t have adequate water, the people saw this at the very beginning,” Wyrsch said. “We exceeded all the hydrants … We used our Jones Street tank and we went up to our Ashbury Street tank and now we are flowing water all the way from Twin Peaks.”

MORE NEWS: UPDATE: 2-Alarm House Fire Contained In San Francisco's Bayview District

By 11 a.m. the fire was 90 percent contained and its advance had been halted. Two large commercial buildings had been reduced to smoldering piles of debris. Four others were severely damaged. Three residents had managed to safely escape the flames.