A water company has been fined a total of £150,000 for allowing a sewage treatment plant to pollute drains on four occasions.
Anglian Water admitted offences relating to discharges of ammonia and improperly treated sewage from its works in Newmarket, Suffolk.
On one occasion 1,200 fish died after sewage escaped for more than 15 hours.
The company was handed the fines at Ipswich Crown Court and told to pay the Environment Agency's costs of £28,973.
It had earlier pleaded guilty to the offences at Mildenhall Magistrates' Court.
Any event which causes damage or potential damage to the environment is taken extremely seriously
Anglian Water spokeswoman
The first of the offences happened in January 2006 when the level of ammonia discharged from Newmarket Sewage Treatment Works was more than twice the level allowed, the court heard.
The second offence happened in July 2006 when large amounts of improperly treated sewage were discharged into the Soham Lode waterway after a pump failed.
Over 48 hours, 1,200 dead fish were removed from the river by Environment Agency officers and the public, the agency said.
On 4 September 2006 there was a further breach when waste water with excessive amounts of ammonia was discharged into the public drain after a mechanism failed.
Anglian Water was given fines of £40,000, £80,000 and £30,000 for the offences.
It asked for a fourth offence to be taken into consideration in sentencing, relating to an incident in April this year when sewage was again discharged into the public drain.
An Anglian Water spokeswoman said the company had apologised for the offences.
She said: "Protecting and enhancing the environment in which it operates is a key priority for Anglian Water, and any event which causes damage or potential damage to the environment is taken extremely seriously."
The spokeswoman said lessons had been learned from the incidents and processes had been "tightened up".