A strong odour lingering around Whangarei's Kioreroa Rd was caused by chemicals entering the district's giant digestive system, and should be gone by the end of the week.
The Whangarei District Council had received a few complaints about the smell around the wastewater treatment plant since Christmas, and said it was caused by a "toxic shock event" which peaked on Christmas Eve.
The wastewater treatment plant is a giant digestion system and - much like the human system - it relies on bacteria to break down nutrients and produce waste that can be managed.
The council said normally this happens behind the scenes and the public don't know much about it.
"But, just as with our own innards, if something poisonous gets into this system and wipes out the good bacteria the results can be pretty unpleasant for everyone," a council Facebook post explained.
One person who commented on the Facebook post said they worked across the road and "some days sure are worse than others ...".
Another said they were gagging when they went past last Thursday.
Council wastewater and stormwater operations manager Andy Keith said something got into the system on Christmas Eve.
Keith said although they aren't 100 per cent sure what caused the upset, the timing suggests commercial businesses had a pre-break clean and a huge quantity of cleaning product was washed into the plant.
Those cleaning products enter the plant from drains that lead to the sewer - toilet, shower, sinks, washing machines etc.
A basic test did not return elevated levels of anything in particular.
The toxins killed the biological digestion processes at the plant.
That affected two parts of the plants. One was the water treatment processes. Most of the tiny organisms which eat the nasty compounds in the water were wiped out.
"They recovered pretty quickly, in two to four weeks."
Keith said staff monitored the organisms, but they regenerated naturally.
The other affected area was the "sludge digesters".
Sludge is the solid compounds in the wastewater - namely food scraps from waste disposal units in sinks, and faeces. Once this sludge has been separated from the water it is pumped to a digester.
At the right temperature and PH level, naturally occurring bacteria hit a "sweet spot" and go to work breaking the sludge down.
The process generates methane, which is used to keep the temperature in the digester up.
When Keith saw there was no methane production, he knew something was wrong.
It was the first time in the 20 years he had worked at the plant that the digesters had been wiped out.
Keith said they had to put 10,000 litres of sodium hydroxide, worth about $14,000, into the digesters over two to three months to control the pH level after the "toxic shock".
"During that process, it's like when a human gets sick, you don't want to get back into your full food source so we had to feed slowly and therefore had to bypass a lot of raw sludge during that time."
The sludge was bypassing the digesters and going straight to the final step - dewatering.
Keith said that's where the smell was coming from - the raw sludge was sitting in open-topped holding tanks waiting for dewatering.
He said three months is the amount of time expected to get the digester going again from scratch.
Keith said if they were able to pinpoint where the contamination had come from the council would look at prosecution, but in this instance there was no way to know exactly where the chemicals came from.
This week he had to replace the a pipe in the digester, which briefly took the sludge system off line again, but the smell from that work he expected to have disappeared by the end of the week.