New Zealand's second biggest dairy company Open Country has been convicted and fined $137,500 for discharging odour that caused nausea, retching and vomiting for some in the Waharoa community near Matamata last year.
The company was also ordered in the Hamilton District Court to put $120,000 in a trust for the community as reparation.
It was the fifth environmental prosecution against Open Country in the Waikato.
Sentencing, Judge Jeff Smith said it had been recognised from 2014 that a system upgrade was needed at the company's Waharoa processing site and upgrades had been started, but it was clear this was done on a piecemeal basis and over the next four years the system had not been completed.
"In such circumstances I am satisfied the actions of the company were reckless and bordering on deliberate given the size of the investment required to remedy the systemic errors," he said.
The company had now spent $20 million on a system representing a significant increase in capacity and in the quality of the discharge.
Judge Smith considered the impacts "severe, particularly for those people who may have had respiratory conditions already".
Waikato Regional Council, which brought the prosecution, said between January 3 and February 23 last year it received 109 complaints from 43 local businesses and residents about the smell.
Complainants said the odour was nauseating, in some cases triggering retching and vomiting. Some had to seek medical attention, the court heard.
Some residents reported having to keep their homes and workplaces closed at the hottest time of the year. Others reported having to clean clothing and furnishings permeated by the odour.
Complainants also reported other impacts, including feeling isolated because they felt they could not go outside, and economic effects from fewer customers visiting local shops.
During the prosecution, the company suggested a trust be established for the community. The court set the amount of $120,000 to be paid into it.
The trustees are community members and a regional council representative.
Open Country has been approached for comment. The company is 76.7 per cent owned by Talleys Food Group and 15 per cent by Singapore's Olam International.
Council regional compliance manager Patrick Lynch said the community of Waharoa had "put up with some pretty terrible experiences over the last decade or so from the operation of this company".
"As a result the council has had to put a disproportionate amount of regulatory resources into trying to get positive behaviour change from this company. We are aware there has been significant investment in infrastructure on the site which does bode well for the future and in particular for the community.
"We sincerely hope this is the last time there are any avoidable environmental incidents that require this company to be brought before the courts," Lynch said.
The council has taken five Resource Management Act prosecutions against Open Country since October 2007, including the latest action.