The House of Lords has blocked the UK government's plan to relax restrictions on water pollution to encourage housebuilding in England.
Labour led a rebellion in the Lords on Wednesday to defeat the government in a vote on removing the EU-era "nutrient neutrality" rules.
Ministers believe up to 100,000 new homes could be built by 2030 if water pollution regulations are loosened.
But environmental groups said the move would mean more polluted waters.
Shadow minister Nick Thomas-Symonds said the government had put forward "an entirely bogus dilemma".
"Don't pretend it's a choice between looking after our environment and building more houses, because it isn't," he told Radio 4's Today programme.
The government announced plans to scrap these rules through an amendment, or change, to the Levelling Up and Regeneration Bill, currently going through the House of Lords.
Because of the late stage at which the government tried to introduce the change, it cannot try again in the House of Commons now it has been defeated in the Lords.
Ministers would need to bring the proposal forward in a new bill.
The defeat is a victory for Labour, whose deputy leader Angela Rayner led opposition to the plan in her new role as shadow levelling up secretary.
Ms Rayner said the defeat showed "the Tories have utterly failed in their attempt to score cheap political points with a flawed plan".
She added: "We stand ready to sit down with the government, housebuilders and environmental groups to agree on a workable solution to build the homes we need."
The Levelling up Secretary, Michael Gove, said Labour had ordered peers from its party to block "the dream of homeownership for thousands of families".
"This is despite boasting that Labour would be the party of the builders not the blockers," he said.
The attempt to ease the rules, by amending the Levelling-Up and Regeneration Bill, was defeated by 203 votes to 156, a majority of 47.
Liberal Democrat Lords spokesperson for communities and local government, Baroness Pinnock, hailed the result as a "great victory".
"The Conservatives have continually promised not to roll back our environment rules, it is deeply shocking that they can't be trusted to keep their word," Baroness Pinnock said.
Green Party peer Baroness Jenny Jones said the government should consult the public before they consider bringing back the plan to scrap pollution rules in a separate bill.
"They can then consult properly and justify it to a public who are already fed up with polluted local rivers and beaches," Baroness Jones said.
Natural England rules currently mean 62 local authorities cannot allow new developments unless builders can prove their projects are "nutrient neutral" in protected areas.
The government said by removing the restrictions, housing developers will deliver an extra £18bn in economic activity.
Ministers argued that watering down the requirement would have a negligible impact on pollution, and had announced new environmental measures, including doubling investment to £280m for the Nutrient Mitigation Scheme run by Natural England.
But environmental groups and opposition parties opposed the plans, with Labour arguing the change would increase river pollution.
The government said Labour was blocking house building after years of undersupply.
At Prime Minister's Questions on Wednesday, Prime Minister Rishi Sunak said Labour under Sir Keir Starmer could not be trusted to build more homes.
He said Labour's opposition to the government's plans was "typical of the principles-free, conviction-free type of leadership that he offers".
Sir Keir's spokesman rejected the charge, saying the government's plans were "rushed and flawed".
"We do have serious concerns about the way in which the changes the Tories are proposing will harm our waterways and ecosystems," he said.