A water company has been fined £200,000 for supplying "inadequately disinfected" drinking water to almost 80,000 people.
United Utilities admitted supplying the water twice from Sweetloves treatment works in Bolton, Greater Manchester.
The Drinking Water Inspectorate (DWI) said there had been "serious failures" by the company.
United Utilities was also ordered to pay £54,000 in legal costs during a hearing at Bolton Crown Court.
The firm, which has apologised for the incidents, was fined for supplying the water in 2015, between 31 March and 3 April, and 19-22 July.
The DWI said there were no reported cases of ill health following the breaches, but restoring drinking water to an "acceptable standard" after the second event had a "significant impact" on households.
Nearly 18,000 properties were left without water for almost 24 hours on 20 July.
People were then asked to boil all drinking water as a precaution until the afternoon of 23 July.
The DWI said the events arose due to the "failures" in the water quality monitoring process and criticised the company's procedures.
Water inspectors said the firm "failed to take adequate steps and learn appropriate lessons from the April event".
Marcus Rink, the DWI's chief inspector, said the company would be required to meet quality standards and "protect consumers".
United Utilities director Martin Padley said the firm was "very sorry".
He said it takes its responsibility "very seriously" and had invested more than £150m on new technology and processes including a "fail-safe system" at Sweetloves treatment works to make sure this type of event does not happen again.
In a separate case, United Utilities was also fined £300,000 after drinking supplies were contaminated with cryptosporidium between 30 July and 18 August the same year.
The prosecution claimed animal waste seeped into an underground tank and contaminated the water at works near Preston in Lancashire.