A water company has been fined £35,000 after it pumped raw sewage into the River Alt in Liverpool.
The Environment Agency launched two investigations into United Utilities after complaints from the public.
It found sewage was being pumped into the river at Harecroft in Croxteth from the Huyton Farm pumping station in June and August last year.
United Utilities pleaded guilty at Liverpool Magistrates' Court to causing sewage effluent to be discharged.
The court heard the company had failed to maintain an adequate 24-alarm system which would warn when there was a problem with the pumping station.
United Utilities asked for four offences of contravening conditions of its consent in respect of alarm requirements to be taken into consideration.
It was also ordered to pay more than £4,000 costs to the Environment Agency.
Neil Finch, from the Environment Agency, said after the hearing that sewage had been pumped out on both occasions for more than 48 hours.
"In the absence of an adequate alarm system more regular checks of the station could have prevented or minimised the discharges and avoided or limited the impact on the river," he added.