A family business allowed a massive pile of waste to grow out of control, costing Bolton council £3 million to clear away.
The Environment Agency (EA) says there was a serious risk of rat infestation and fire at two sites in Bolton and Leigh that had not been properly dealt with.
It took Bolton company SC Chadwick and Sons Ltd to court over breaches of its environmental permit, which led to the sites being at high risk of pollution.
The Bolton site was left to be cleared by the council after being abandoned by the company - costing taxpayers an estimated £3 million.
EA says that across both sites, the company 'consistently brought more waste on than was removed, apparently for financial reasons' - leading to prosecution at Bolton Crown Court this week.
An investigation into the firm's Bolton site ran from June 28, 2014, to February 27, 2016 - the same year the company ceased trading.
Officers found that the site exceeded maximum waste height limits - increasing in height to five metres.

EA said that the sheer volume of waste on the site was stopping it from being processed efficiently and preventing vehicles moving around safely.
The site attracted 172 odour reports from 2014 to when it closed, while eight fires were reported between 2006 and 2013.
Following an inspection with Greater Manchester Fire and Rescue Service, EA found that fire risks were not being properly managed in line with prevention plans.
EA officers made numerous visits to the sites offering advice and guidance, the public body says.
Company director Sean Chadwick, of Manchester Road, Leigh, and company secretary Michael Chadwick, of Kenwood Avenue, Leigh, pleaded guilty to permit breaches at the Bolton site, permit breaches at the Leigh site and failure to comply with an enforcement notice in Leigh.
Company director Gary Chadwick, of Culcheth Hall Drive, Warrington, pleaded guilty to the two Leigh charges.
Sean Chadwick, 48, and Michael Chadwick, 73, were each handed a 10-month prison sentence, plus two 14-week sentences, all suspended for 18 months.
Gary Chadwick, 51, was given two 14-week sentences, suspended for 18 months.

Mark Easedale, area environment manager for the Environment Agency, said: “The Environment Agency is committed to taking robust enforcement action against those who break the law, to protect communities and the environment.
“In this case the defendants consistently failed to respond to advice and guidance, warnings and statutory notices requiring action to improve operations at both of their sites.
“The Environment Agency permit waste sites to ensure they operate legally and with minimal impact on the environment.
"Sites that operate outside the terms of their permit undercut legitimate businesses and, in this case, caused harm to the environment through waste fires and misery for residents and businesses. They also cost taxpayers money as Bolton Council had to clear the site at considerable expense.
"We are determined to make life hard for criminals and support legitimate business by disrupting and stopping the criminal element.”