Firefighters feared a possible explosion while battling a toxic blaze at a fertiliser plant near Napier.
The fire broke out on a conveyor belt suspended over as much as 1000 tonnes of sulphur in a storage shed at Ravensdown's Awatoto plant yesterday afternoon.
It took 60 firefighters wearing breathing apparatus to bring the fire under control.
Area Commander Ken Cooper said the burning sulphur was difficult to extinguish.
"If you disturb it with water it goes into a sort of powder and dust and you can get a dust explosion," he said.
Two firefighters had to be treated at the scene after getting sulphur dioxide, a highly toxic gas, in their eyes.
The gas is produced when water comes into contact with the sulphur.
"As a precautionary measure we put a cordon in place which involved asking the residents nearby to stay indoors, to close windows and doors, and turn off air-conditioning until we were happy that there was no risk to the public," Mr Cooper said.
He said it was lucky the flames never dropped from the conveyer belt to the sulphur stored below.
In the rural Awatoto area downwind, five houses had to be evacuated because of the toxic gases.
Hawke's Bay medical officer of health Nick Jones said the risk was both from the smoke and gases such as sulphur dioxide, particularly to people with asthma or other respiratory conditions.
Ravensdown chief executive Greg Campbell said company's procedures kept staff safe, and minimised damage.
"We'll look forward to an investigation into the causes once we've finalised the incident."
The conveyor belt was destroyed but the shed was hardly damaged, the Fire Service said.