LONDON - Britain's Brexit bill passed its final hurdle in Parliament on Wednesday after the House of Lords abandoned attempts to amend it.

The acknowledgment came after the House of Commons overturned changes to the government's flagship Brexit bill made a day earlier by the Lords.

The bill will become law when it receives royal assent from Queen Elizabeth II, a formality.

Britain is scheduled to leave the European Union on Jan. 31.

The Lords voted Tuesday to demand that post-Brexit Britain continues to let unaccompanied migrant children in EU countries join relatives living in the U.K. The promise was made in 2018 by former British Prime Minister Theresa May, but it was removed from the Brexit legislation after Prime Minister Boris Johnson's Conservatives won a big parliamentary majority in an election last month.

Johnson's government says it intends to continue resettling child migrants in Britain after the country leaves the EU but argues that the issue does not belong in the EU withdrawal bill, which sets out the terms of Britain's departure from the 28-nation bloc.

Brexit Secretary Stephen Barclay said an agreement on taking in the children “is ultimately a matter which must be negotiated with the EU, and the government is committed to seeking the best possible outcome in those negotiations.”

But Labour lawmaker Yvette Cooper accused Johnson's Conservative government of planning to “betray the commitments that have been made to the most vulnerable children of all.”

The House of Commons also stripped out changes made by the Lords to bolster the rights of EU citizens in Britain, protect the powers of U.K. courts and ensure a say for Scotland and Wales in post-Brexit legal changes.

The wrangling won't stop the Brexit bill from becoming law within days, because the House of Commons can override the unelected Lords.

Members of the Lords acknowledged Wednesday that they would have to give way.

“We are at the end of a very long road,” said Martin Callanan, a Brexit minister in the Lords.

The EU parliament also must approve the Brexit divorce deal before Jan. 31. A vote by the European Parliament is expected next week.