The government says it will force water companies to make a "progressive reduction" in the sewage it dumps in rivers, amid pressure from the Lords.
Peers proposed a change to the Environment Bill last week in an attempt to cut the pollution, but it did not win enough support from MPs.
It led to a backlash on social media, and Lords promising to try again.
But Environment Secretary George Eustice has now promised to bolster measures by making them a legal duty.
He said the government already had plans in place to require water companies to act on sewage, but added: "We've listened to the debate in Parliament [and] we will write what was already government policy into [law] to give people the reassurance they seek."
The crossbench peer who put forward the Lords amendment, the Duke of Wellington, said he met Mr Eustice earlier on Tuesday ahead of a debate in Parliament on the Environment Bill.
Speaking in the Lords, he said was "grateful for the gesture", but he had yet to form an opinion on the language of the government's proposal, so would be pushing ahead with his own plan to end the "revolting practice".
The duke's amendment passed in the Lords by 213 votes to 60, and will now be debated by MPs at a later date.
However, due to parliamentary rules, his amendment would have to be approved by the Lords anyway to allow the government to replace it with its own plan when the bill returns to the Commons.
The environmental issue has come to a head days before the start of the COP26 climate summit, being hosted by the UK in Glasgow.
The Environment Agency allows water utilities to release sewage into rivers and streams after extreme weather events, such as prolonged heavy rain.
This protects properties from flooding and prevents sewage from backing up into streets and homes.
But according to the public body's own figures, water companies discharged raw sewage into rivers in England more than 400,000 times last year, with untreated effluent - including human waste, wet wipes and condoms - released into waterways for more than three million hours in 2020.
The Lords agreed an amendment to the Environment Bill that would put a legal duty on water companies and the government to demonstrate progressive reductions in discharges of untreated sewage and required them to "take all reasonable steps" to avoid using combined sewer overflows.
But when the proposal was voted on by MPs last week, it lost by 265 votes to 202 - even with 22 Tories rebelling against the government to vote in favour of the plan.
The government had said the amount of sewage discharged by water companies was "not acceptable" and that it had made it "crystal clear" to firms that significant reductions must be a priority.
But a spokesman for Prime Minister Boris Johnson said the intentions of the Lords' amendment, which it said would involve an overhaul of the UK's Victorian sewerage system - would cost upwards of £150bn.
"That would mean that individuals - every one of us as taxpayers - paying potentially thousands of pounds each as a result," they added.
Shortly before the issue was brought up again for debate in the Lords, the Department for Environment, Food and Rural Affairs proposed its own amendment for when the bill returns to the Commons.
The new legal duty would be placed directly on water companies to make a "progressive reduction" in the sewage it dumps into rivers.
It follows on from advice it gave the industry's financial regulator, Ofwat, earlier this year, saying water companies must take steps to significantly reduce storm overflows and that the regulator should ensure funding should be approved for them to do so.
And the firms would need to produce "comprehensive statutory Drainage and Sewerage Management Plans, setting out how they will manage and develop their drainage and sewerage system over a minimum 25-year planning horizon - including how storm overflows will be addressed".
A number of peers welcomed the move by the government, but some warned it still may not go far enough, with Labour's Baroness Quin saying she hoped the government would move even further now people across the country were "waking up to the problem".
Labour's shadow environment secretary, Luke Pollard, also said the "screeching u-turn" on the issue due to the public backlash would "do little to convince the public that the health of our rivers, rather than the health of Conservative polling, is at the forefront of ministers' minds".
He added: "The government still has no clear plan and no grip on the issue of raw sewage being pumped into our seas and rivers."