Tesco has been fined £8m after the supermarket's "recklessness" led to a fuel leak from one of its petrol stations, polluting sewers and waterways.
The Environment Agency said 23,500 litres of petrol escaped from a tank over a 29-hour period in Haslingden, east Lancashire.
The 2014 petrol spill resulted in homes being evacuated, residents suffering sickness, and dead fish and other aquatic life, the agency said.
Tesco admitted health and safety breaches and an environmental offence.
Noxious fumes from the leak caused residents living up to 1km away from the spill to seek medical attention from headaches and other illnesses.
The spill sparked a major operation involving the Environment Agency, Lancashire County Council and police and fire and rescue services.
The agency said: "It had a massive impact on the local community and environment with residents having to leave their homes due to petrol odours coming from the sewer network."
An investigation found the incident "resulted from Tesco's failure to address a known issue with part of the fuel delivery system and an inadequate alarm system and was compounded by poor emergency procedures".
Mark Easedale, environment manager for the Environment Agency, said: "The sentencing today sends out a clear message to anyone whose recklessness causes serious pollution to the environment – we will be relentless in our investigations and take action wherever needed."
A Tesco spokesman said: "We sincerely regret the fuel spillage incident at our petrol station in Haslingden and we're sorry for the impact it had on the local environment, our customers and the community.
"This was a deeply unfortunate isolated incident and one for which we have taken full responsibility."
He said Tesco has since inspected "all relevant stations", introduced a new monitoring system, and made further improvements.
The supermarket was fined £5m after admitting a health and safety offence and £3m over an environmental breach, at Preston Crown Court.
In April, Tesco was also fined £129m over an accounting scandal that led it to overstate its profits by £326m three years ago.