The decision this week to refuse permission for one of Britain's first industrial-style farms housing 25,000 pigs has been welcomed by campaigners.
The unit at Foston, Derbyshire, has been the subject of fierce opposition in a four-year-long fight that saw celebrities including actor Dominic West and River Cottage chef Hugh Fearnley-Whittingstall stand up against the proposed farm due to its size.
Now the Environment Agency has turned down the permit application by Midland Pig Producers on the grounds it posed risks to human health as well as human rights.
There is mounting public anxiety that industrial, intensive pig rearing systems cause stress and illness in animals and threaten human health. The regular over-use of antibiotics in such 'factory' farm systems is producing antibiotic-resistant superbugs.
The farms also pollute the air and water.
"These factory systems are cruel to pigs," said Tracy Worcester Director of Farms Not Factories, which campaigns for consumers to buy their pork from real farms.
"They are also a threat to traditional family farmers who, though they have a lower cost in terms of human health and environmental pollution, - incur higher costs when rearing their pigs humanely and therefore cannot compete economically with cheap, low- welfare pork.
The Environment Agency’s main reasons for refusing a permit were that the health threats from bio-aerosols and ammonia, pollution from odour and contamination of watercourses posed unacceptable risks. They also considered the rights of the people living nearby under the European Convention on Human Rights.
Jim Davies, leader of the Foston Community Action Group, said local residents, who had been almost unanimous in opposing the plan, were hugely relieved. "After four years of public consultation the facts are now clear; the applicants provided insufficient information and should now abandon this flawed scheme forever," he said.
Sue Weston, whose house is next door to the proposed site, said she was "over the moon" at the decision.
"This industrial development would totally ruin the small village community of Foston and put innocent families in danger from the unknown consequences of an experimental pig prison."
Midland Pig Producers told the BBC, "it seems inevitable that this outcome will provide others with the reason to refuse any application connected with our plans".
"The Ministry of Justice, which runs the women’s prison at Foston less than 150 metres from the proposed site, also sent in a list of objections," added Ms Worcester.
"Now the Environment Agency has listened and it's time for Midland Pig Producers to withdraw their planning application and give local people back their peace of mind."
She added, "UK farmers must produce to a higher animal welfare standard than farms in the EU, so consumers need to look for UK high welfare labels like Freedom Food and Organic. To cover the extra cost we can buy less popular cuts, shop online or at a local farmers’ market. Consumers paying a fair price for UK high welfare pork is the only way to avoid animal factories such as Foston. We totally reject the National Farmers Union's idea that UK producers have to get big or get out of the industry"