River watchdog the Environment Agency has been fined £7,500 for polluting the River Exe, in Somerset.
Pollution came from concrete waste
It is the first time the organisation, which protects rivers, has been prosecuted for water pollution in the 10 years since it was created.
In September 2005, a sub-contractor building a flow-monitoring station on the river inadvertently leaked toxic building waste into the main tributary.
The pollution was the most serious "level one" type and killed 300 fish.
Because the Environment Agency cannot prosecute itself, a local landowner, Ian Cook, was given government permission to bring a private prosecution.
After pleading guilty, the Environment Agency was fined £7,500 at Exeter Crown Court and ordered to pay £1,466 costs.
The subcontractor, May Gurney, from Norwich was fined £27,500 and £1,466 costs.
Judge Jeremy Griggs said: "It is surprising to find the Environment Agency as a defendant in the dock.
"It is clearly for them a serious matter and in a sense an embarrassing matter."
He put the pollution down to carelessness and said a significant sanction had to be imposed to ensure environmental standards were complied with.
At the time of the incident, those responsible at May Gurney had an insufficient appreciation of environmental factors, he said.
Mr Cook told the court: "The Environment Agency sets standards for everyone else. When they fail there is surely greater culpability.
"The river was at its most vulnerable, with trout throughout the system.
"Extra vigilance was needed. It is a sad day for the river."
He said he saw fish go "belly up" when they swam in the polluted water and he thought up to 900 may have died.
Richard Banwell, for the agency, said both parties to the work at the river understood clean water would be discharged and "neither contemplated what occurred".
He said the Environment Agency felt the fish had recovered but there were a number of lessons to be learned and there was inadequate supervision of the project.
Garrett Byrne, for May Gurney, said the company apologised to "each and every affected owner" and was "thoroughly ashamed of itself to find itself in court today".
Three of the management team at the site were disciplined and the company lost £3m in contracts because of the case, he said.