Plans for the UK's largest dairy farm have been withdrawn, the farmers behind the scheme have announced.
Nocton Dairies Ltd wanted to build the farm, housing 3,770 cows, near Lincoln.
There had been widespread opposition to the plans with concerns raised about the environmental and animal welfare impacts of the proposed "super dairy".
The farmers said their "sole" reason for the decision to withdraw their application was the objection by the Environment Agency.
They said they had written to North Kesteven District Council to formally withdraw their application for planning permission to build the facility.
The council was due to consider the planning application in March.
The original plans for the UK's largest dairy farm were for 8,100 cows on a single site at Nocton Heath - provoking an angry response from opponents who labelled it "the equivalent of battery chicken farms for cows".
That planning application was withdrawn last year, but the two farmers, Peter Willes and David Barnes, resubmitted the Nocton Dairies scheme in November with less than half the number of cows.
In a statement, they said: "The fundamental concept we have been proposing is a sound one: expand dairying toward the east to re-integrate livestock and arable farming, make better use of resources, proactively manage welfare, gain economies of scale, and look to support a long-term reduction in water pollution.
"We challenge other farmers to pick up the baton and see where these concepts can take them."
The Environment Agency had lodged their objection to the plans amid concerns about the potential for pollution seeping through limestone into groundwater, from which drinking supplies are drawn.
An agency spokesperson said: "We have maintained our objection to the revised application for the proposed super dairy at Nocton because we consider the risk to groundwater to be unacceptable.
"We asked the developer to address the risks to groundwater, so important for public water supplies in this area, in their revised application.
"But, despite additional evidence being submitted, our original concerns about slurry management at this environmentally sensitive location remain."
Suzi Morris, UK director of the World Society for the Protection of Animals (WSPA), said: "While the Environment Agency's objections were the final nail in the coffin for the Nocton plans, our own research made it clear there was a huge range of reasons why Nocton should not be given the go-ahead.
"This is a victory for consumers, dairy farmers and, of course, the cows within it, and we can't forget the Lincolnshire community which has had a narrow escape."