PASSAIC, N.J. (CBSNewYork) -- Authorities say they have contained a massive fire at a Passaic chemical warehouse Saturday morning.
Firefighters remain on the scene of the blaze, which began Friday night.
The mayor is asking Passaic residents to keep their windows shut as a precaution.
As CBS2's Christina Fan reports, the fire was still smoldering Saturday afternoon. At one point, a chlorine plant started burning, raising fears about air quality and possible mandatory evacuations. But fortunately, that fire is under control, and Department of Environmental Protection officials say the air is safe to breathe.
"The main concern is to try to avoid having that fire reach the main chemical plant," Passaic Mayor Hector Loya said. "This is going to be an ongoing process."
Loya said the fire was challenging because it involves two structures, including one facility which makes furniture and the other a chemical plant that produces chlorine for pools.
Loya cautioned there's a possibility of mass evacuations if the fire reaches the part of the facility with the greatest concentration of chlorine.
Web Extra: Drone Force 2 Over Passaic Fire
"I have to be clear if that gets to that area we will be looking at potential mass evacuations of the area and of course because of the smoke and the toxic fumes, it would endanger the lungs of not only the residents in Passaic, but those in Bergen, Essex County and surrounding areas," Loya said.
The massive blaze grew to 11 alarms at its peak, and was since downgraded to four alarms.
A huge fireball lit up the night sky in Passaic followed by a toxic cloud of smoke.
The burning chemicals inside could be seen - and smelled - miles away along Route 21.
"I was really scared, you know, like, it was like crazy. I've never seen nothing like that, you know?" said witness Mark Ervin
The fire started around 8:30 p.m. Friday night inside a warehouse owned by QualCo Incorporated on Canal Street.
Security guard Justin Johnson was the only one working inside at the time. He says he was checking the building's water pressure when he noticed smoke.
"I look out the window, I see smoke coming from, maybe, like, the stack tower right there. I don't know if that caused the fire or not, but I also see smoke coming from there, so I decided to come back to security office, called the fire department and get them down here. The alarm system went off already," Johnson said.
Firefighters fought for hours to contain the flames, but the fire continued raging out of control, igniting a nearby chlorine plant, and triggering massive concerns about air quality.
Early Saturday morning Lora took to Facebook to warn people living nearby.
"To all residents in the immediate area, please close your windows as our firefighters are desperately working to get this fire under control," Lora said.
Lora spoke to Fire Chief Patrick Trentacost on Facebook just after 12 a.m. Saturday.
Trentacost said most of the building that the fire originated in has collapsed. It was used for storage of plastics and pallets. According to Trentacost, a portion of the building had chlorine in it, but he said, "That seems to be under control at this time."
While some neighbors walked outside to gawk at the wall of flames, others fled the other direction.
"Yeah that's why I'm heading out right now. I don't know what these people are doing getting too close. But it's worrying. You don't know what's going to happen," said Passaic resident Joel Heredia.
"That's why we left. We came to check it out to see how bad the situation was because we live right over there. And we don't know if the fumes are going to come over and if it's going to have any long-term side effects for like lungs or anything. So it's really scary," said Passaic resident Sophia Liu.
Watch Nick Caloway's 11 p.m. report --
New York City warned residents they may be able to see or smell smoke from the fire.
Some neighbors went to take pictures and video. Others fled in the other direction.
Some residents of nearby apartment buildings were not taking any chances.
Leidy Caraballo's family packed up the car to make a run for it.
"And we see the fire, so we don't want to wait until the fire passes our building," she said.
Several roads in the area were closed because of that fire, including the nearby Route 21, which was shut down in both directions at Exit 12/Dayton Street.
Lora said, at one point, a portion of the warehouse collapsed.
The fire chief said one firefighter was transported to a local hospital after getting hit in the face by debris.
CBS2's Nick Caloway contributed to this report.
for more features.