About 110 firefighters from the Los Angeles Fire Department and Los Angeles County deployed Wednesday afternoon to a blaze at a cold storage and freezing warehouse owned by Lineage in the Boyle Heights neighborhood near downtown, according to LAFD spokesperson Jennifer Middleton. Both the city and county sent firefighters and hazmat teams to contain the fire.

By the time crews arrived, the solar panels covering the warehouse roof had caught fire, Middleton said. Firefighters initially attempted to stop the flames using hand lines on the roof, but were forced to retreat after an ammonia line burst.

“At some point, an ammonia line was compromised and we had a large, pressurized off-gassing of ammonia,” LAFD Chief Jaime Moore told NBC News 4.

Cold storage facilities commonly use ammonia as a cost-effective refrigerant, but the chemical is both toxic and flammable. Moore warned residents with health conditions to stay indoors with windows closed and air conditioning off while the city monitored air quality for evidence of ammonia off-gassing.

“I urge everyone in the impacted area to get indoors immediately, close windows and doors, turn off air conditioning, and avoid unnecessary travel to the area,” Los Angeles Mayor Karen Bass wrote in a tweet.

The fire grew so large and hazardous to approach that responders took the unusual step of dousing it from above with helicopters, while firefighters evacuated the roof. At least three helicopters delivered more than half a dozen air drops of water, according to Middleton.

“The amount of fire that they had was overrunning the amount of water we were able to put on it and our firefighters had to evacuate the area for a few minutes there while it was off-gassing,” Moore said.

By the evening, the roof fire had been largely contained, Middleton said. However, the roof showed signs of sagging, and the presence of solar panels raised concerns that the building might contain lithium ion batteries to store energy gathered from the sun. Moore called lithium ion batteries “one of our newest challenges in the fire service.”

Lithium ion batteries are capable of a process called “thermal runaway” that makes them difficult to extinguish. Middleton said of such battery fires: “It’s extremely hard to fight the fire, it’s dangerous to be around the fire, and it’s dangerous to be around the extremely hazardous smoke.”

The cause of the fire remains under investigation, Middleton said. Lineage did not immediately respond to a request for comment.