MPs have overturned all the changes the House of Lords made to ministers' plans to cut legal aid in England and Wales.
Peers had inflicted 11 defeats on ministers over proposals to limit the scope of publicly funded support, which critics say threaten access to justice.
Ministers say the changes will speed up the system and save £350m a year.
However, the government has conceded that victims of domestic violence should be given easier access to legal aid than ministers had been planning.
The 11 defeats for the bill in the Lords represented the highest number for a piece of legislation since the coalition came to power in 2010.
Ministers had faced criticism that their changes would make it too difficult for women abused by their husbands and boyfriends to get the advice they needed as the definition of domestic violence was too narrow.
But Justice Secretary Ken Clarke made a U-turn, saying the government was amending the Legal Aid, Sentencing and Punishment of Offenders Bill to make it easier for women to receive the taxpayer-funded support they need.
A source close to Mr Clarke told the BBC it was a "major concession" which had "put to rest the fear" expressed by some MPs on all sides of the House.
The bill returns to the Lords next week and disputed aspects will now pass between the two Houses - in a process known as parliamentary ping-pong - until the legislation is finally approved.
The government wants Parliament to approve the legislation before the end of the current session, which could come as early as next Thursday.
The proposed legislation would effectively reverse the situation in force since 1999 where legal aid has been available for all civil cases unless specifically excluded by law.