Authorities began drawing up an evacuation plan while testing the air quality following an incident at the Aldex Chemicals plant, about 80 kilometres east of Montreal.
"We didn't want to take a chance," said Pierre Lacombe, director of the local fire department.
But those concerns were soon quelled.
Firefighters said that after tests concluded the air was non-toxic, the plan was called off and residents were allowed to spend the night in their homes. Up until that point, authorities had said an evacuation was possible. The Canadian Press cited local police saying that an order had been issued for 300 homes.
The blaze had left a thick, dark cloud of smoke hovering above the southeastern Quebec city of about 63,000 people.
The plant, located in an industrial park, was swallowed by flames as dark clouds shifted toward the city.
Hours later, firefighters said the blaze was well-contained, but they estimated it would probably take until Thursday morning to extinguish it.
The Aldex plant was a near-total loss.
"Ninety per cent of the plant has been destroyed," said Lacombe, who noted that firefighters worked quickly to keep flames away from the part of the building where the chemicals were stored.
But things could have been worse, he said.
"If the fire would have consumed (the chemicals) we would have had a whole different type of problem. But it worked."
Authorities established a one-kilometre security perimeter in the area and did evacuate some neighbouring businesses. The cause was of the blast wasn't immediately known.
"There were people in the plant when the explosion occurred, but now there's no people there and we have confirmation that nobody's injured," Police spokesman Guy Rousseau said.
An Environment Department official said that some styrene was detected in the air, but the amount wasn't high enough call for the evacuation.
Spokesman Christian Blanchette said the department's main concern was preventing runoff from the fire from entering a nearby river.
The company website says Aldex was founded in 1976 and makes cation resins, used in various decontamination procedures. The local newspaper, La Voix de L'Est, reported that the plant has about a dozen employees.
Other media reports said this was not the first fire at the plant.
Note to readers: This is a corrected story. An earlier version said 300 homes were being evacuated.
Also on HuffPost