The Legal Aid, Sentencing and Punishment of Offenders Bill has cleared its final hurdle in the House of Lords.
Peers passed the legislation, which has been heavily amended during its journey through the upper chamber, at third reading on 27 March 2012.
There were several votes on amendments to the bill throughout the day's debate, two of which the government lost - taking the total number of government defeats to 11.
The bill now returns to the Commons where the government must decide whether to accept or overturn peers' changes to the legislation.
Ministers want to save £350m on its legal aid bill by 2015, arguing it will also speed up the system. But opponents argue this will damage justice.
In this part of the debate, the government put forward amendments offering concessions on plans to ban referral fees for personal injury cases.; which were agreed without the need for a division.
Labour's Lord Prescott failed in an attempt to block changes to "no-win no-fee" legal agreements for privacy and defamation cases.
The former deputy prime minister's amendment was rejected by 194 votes to 120, government majority 74.
Similarly, an amendment by former Lord Chief Justice of England and Wales Lord Woolf concerning restorative justice was defeated when peers voted by 123 votes to 69 against it.
The Liberal Democrat's Baroness Miller of Chilthorne Domer wanted to amend the newly-created offence of squatting, added to the bill by the government.
She argued that squatting should be decriminalised if a building "has been empty for 12 months or more and is not subject to a current planning application".
But Lady Miller agreed to withdraw her amendment after comments from the minster, Baroness Northover.
Later on however, she called a vote on a related amendment - but it was defeated by 107 votes to 26.
Other amendments debated related to metal theft and insolvency proceedings - but both were withdrawn without a vote.
of the debate.