Brave fire crews battling the inferno at the Northbay Pelagic fish factory on Saturday prevented a toxic cloud of chemicals spreading over the town.
As emergency crews fought the blaze, staff from the site alerted the fire service that flames were sweeping towards large tanks of ammonia.
Using a forklift truck to demolish a wall, workers and firefighters were able to protect the area and prevent a new crisis from developing.
Strong winds were already blowing thick, acrid smoke and ash across Peterhead town centre when crews were alerted to this new danger, and yesterday fire chiefs revealed how serious the situation could have become.
Scottish Fire and Rescue Service group manager David Meldrum told the Press and Journal: “One of the major concerns for us was that there were ammonia tanks within the building and crews did very well to keep those tanks isolated from the fire and preventing the fire spreading towards that.
“What we could have had was a cloud of ammonia travelling over Peterhead due to the wind direction. It would have gone towards the town centre.
“Once that became involved in the fire, there would have been an additional hazard for the firefighters and it was very important we got that isolated.”
Fire crews faced other hazards including highly-flammable acetylene cylinders and exposed high voltage cables, as well as icy underfoot conditions caused by plummeting temperatures and the high volume of water used to douse the flames.