San Francisco fire officials confirmed to Reuters on Wednesday that a partially-constructed high-rise that burst into flames on Tuesday was still burning, and the upper levels that caved in during the evening could collapse even more.

San Francisco Fire Department spokesperson Mindy Talmadge told Reuters that the residents of a nearby apartment who were evacuated when the blaze first occurred had been instructed to stay out of the building.

The five-alarm fire that might have stemmed from a welding issue suddenly erupted in the Mission Bay district of San Francisco late Tuesday, Reuters reported. The building, labeled MB360 apartment complex, was under construction at the time of the blaze.

Talmadge said the building, that initially measure eight or nine stories in height, was now just four stories.

"The good thing is that it collapsed in on itself," rather than in the street, potentially causing harm to passerby, Talmadge told Reuters.

Residents of at least 30 apartments in one complex across the street were evacuated once hot air from the fire burst through the windows of the building.

More than 150 firefighters were sent to the building, after the fast-moving fire sent plumes of grey smoke into the air at about 5 p.m. on Tuesday. Around 90 fire trucks were sent to the area, according to the San Francisco Chronicle.

According to Fire Capt. Matthew McNaughton, a UCSF research building roof located one block away from the fire was set ablaze for a short period of time.

This fire was San Francisco's largest in many years, San Francisco Fire Chief Joanne Hayes-White told the Chronicle.

The city's mayor commended the fire fighters battling the blaze.

"Thanks to the leadership and determined action of our Fire Department, the very real potential of severe damage to other homes, businesses and structures in the neighborhood was avoided," Mayor Ed Lee wrote in a statement.