A Somerset dairy farm has been ordered to pay £9,425 after dirty water escaped from a storage lagoon.
It follows an investigation by the Environment Agency (EA) following a report of slurry pollution from Clandown Farm, Pows Hill, near Radstock.
The source of the pollution was not found, but an agency officer later discovered dirty water leaking from the base of a lagoon used to store milking parlour washings.
The lagoon had earth banks and a clay lining.
It also contained dirty water from the farmyard.
Instead of repairing the lagoon, farm operators Brunt Partners had installed a drain to carry the leaking liquid to a field soakaway.
The agency, which brought the case before Bath magistrates, said the soakaway could cause pollution and possibly contaminate groundwater.
Brunt Brothers pleaded guilty to an offence under the Environmental Permitting Regulations of causing or knowingly permitting an illegal discharge of dirty water.
The business was fined £5,000 and ordered to pay £4,245 costs.
The agency said the penalty reflected the fact the discharge to the soakaway was deliberate and the pollution had continued over a prolonged period of time.
The operators have since repaired the storage lagoon and improved drainage at Clandown Farm.
Andrew Grant, for the EA, said: “Slurry and dirty water lagoons can cause serious pollution.
“This case shows how important it is for farm operators to invest in and adequately maintain these structures to prevent illegal discharges that can harm the environment.”
Magistrates heard there had been previous pollution incidents at Clandown Farm.
In 2013, a slurry wall collapsed and a large amount of slurry escaped into the Wellow Brook.
The case was heard on 22 December 2016.