The Illegal Immigration Bill has caused tensions between the House of Commons of parliament and the House of Lords, the UK’s upper house.
In the early hours of Tuesday morning, the last of the proposed changes was also rejected.
The legislation will assist the government’s plan to send tens of thousands of refugees to Rwanda, more than 6,400 kilometers away.
Britain struck a $180 million deal with the East African nation last year, but policy remains up to the courts.
The government is contesting the decision, which says the plan is unlawful.
The first planned deportation flight to Rwanda was blocked by a last-minute decision of the European Court of Human Rights a year ago.
The law will allow the government to stop people coming to the UK without permission to seek asylum and deport them either to their country of origin or to a supposedly safe country like Rwanda.
The project has been criticized by some opposition politicians and civil rights groups as inhuman, cruel and ineffective.