Matamata-Piako District Council has been fined nearly $50,000 after discharging sewage into a river in 2018.
A wastewater pipe in Morrisonville was broken when a tree fell on it on December 21, 2018.
It took two days before it was fully repaired, with wastewater flowing into the environment during that time.
Around 100,000 litres of untreated wastewater, including sewage, flowed into a gully running 250m to the Piako River over that time.
An investigation by the Waikato Regional Council found they should have taken steps to stop the wastewater discharged as soon as possible, which didn't happen.
There was a "moderately serious" level of contamination to the river as a result.
The Matamata-Piako District Council has been convicted and fined $49,875 for unlawful and avoidable discharge of wastewater because of the incident.
Hamilton District Court Judge Melanie Harland says the local council should've sought advice from a relevant expert, who had equipment that would've solved the problem.
Senior management at the council also failed to train their managers in what to do in an emergency.
"Had proper training been provided the outcome could well have been very different," she says.
Waikato Regional Council chair Russ Rimmington says the punishment needs to be "appropriate to the scale of offending, no matter who is responsible".
"Wastewater infrastructure, and good management of that infrastructure, is vital," he says.
"It needs to be to a high standard now, and into the future, as climate change and other factors bring more pressure on the environment."