It happened when petrol escaped from a filling tank in Haslingden operated by Tesco in July 2014, sparking a major operation involving the Environment Agency, Lancashire County Council and police and fire and rescue services.

Fuel leaked out of the tank over a 29-hour period.

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".

The supermarket was fined £5m after admitting a health and safety offence and £3m over an environmental breach, at Preston Crown Court.

Mark Easedale, an environment manager for the Environment Agency, said: "This pollution incident had a dramatically negative impact on the local community and the environment with Langwood Brook and the River Irwell severely affected.

"A week after the pollution incident an investigation by Environment Agency officers found fish populations in the River Irwell immediately downstream of Langwood Brook were around 90% lower than those found upstream."

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 fine comes on the day the supermarket group holds its annual general meeting and as it reports better than expected quarterly sales.

It is the latest regulatory penalty to hit Tesco after it was fined £129m earlier this year over a 2014 accounting scandal.