EMERYVILLE (KRON) — Crews have contained a six-alarm fire at a building that was under construction Wednesday morning on the Oakland-Emeryville border, according to fire officials.

The fire was reported at around 2:30 a.m. at 3838 San Pablo Avenue near Adeline Street. The fire was contained by 8 a.m.

San Pablo Avenue is still closed in both directions at 40th Avenue. Fire officials are advising residents to avoid the area as the monitor for hot spots and begin clean up.

The Macarthur on-ramp to westbound I-580 was also closed but has been reopened.

The six-story apartment building was under construction when it caught fire. The fire has also spread to nearby townhouses and condos in Emeryville, according to fire officials.

“The explosions just started going off, one after another,” 39th Street resident Veronica Young said. “It was stronger than fireworks.”

The lights were out along 39th Street when people knocked on the doors of their neighbors to warn them of the fire. Charred remains of the building were strewn on the sidewalk for two or more blocks from the center of the fire.

“People were banging on doors screaming ‘fire, fire’,” Young said. “Very scary. We thought we were all going to have to leave.”

No one was inside the building when it caught fire and no injuries have been reported.

Multiple agencies responded to the fire including the Alameda County Fire Department and the Oakland Fire Department.

Firefighters expect to be on scene for several hours. They are in defensive mode to ensure that the fire does not spread.

Residents in neighboring buildings evacuated. Some evacuated when the alarms in their buildings went off while others were woken up by the commotion and saw the fire nearby.

Flames spread from the building under construction to adjacent townhouses and an auto repair shop. Four townhouse units and the auto shop were destroyed, as were 12 cars at the shop, Deputy Fire Chief Jim Call said.

“A fire of this size is very rare,” Call said.

The glow from the flames was visible from miles away. It could be seen from nearby freeways like I-880, I-580, and Hwy 24.

About 100 firefighters from various regional fire agencies responded to the blaze, which was contained by 7:50 a.m. Call said crews will remain on scene until Wednesday evening to put out any hot spots and to monitor the scene.

He said no injuries were reported in the fire and “that’s the best news.”

A drone was being used to help target hot spots and the East Bay Municipal Utilities District have increased water pressure to help with the firefighting efforts.

According to fire officials, the building is a total loss.

A security guard told KRON4’s Will Tran that he heard fireworks go off before the fire erupted (video below). The cause of the fire is still under investigation.

Apgar Street resident Sheryl Angelo said she didn’t hear anything until someone knocked on her door.

Another 39th Street resident, who declined to give his name, was back home with his two small children after the fire had been contained and said his family spent much of the morning at a neighbor’s home farther from the fire.

About 50 people were displaced and are being assisted by the American Red Cross at the Emeryville Senior Center at 4321 Salem St., according to Call.

Only scaffolding remained standing among the charred wreckage of the building under construction. The wood-framed building produced a lot of heat during the fire, Call said.

Here are artist renderings of the building:Stay with KRON4 News for updates on-air, online and on the KRON4 App.