Image copyright Reuters

The government's Withdrawal Agreement Bill (WAB), which will take the UK out of the EU on 31 January, has passed all its stages in Parliament and been given Royal Assent.

The WAB turns Boris Johnson's withdrawal agreement, which is a draft international treaty, into UK law and gives the government permission to ratify it.

No new clauses or amendments were passed by MPs, who also rejected changes made in the House of Lords.

Image copyright AFP

What's in it?

What does the WAB actually cover? Among other things:

It sets out exactly how the UK will make "divorce bill" payments to the EU for years to come

It repeals the European Communities Act, which took the UK into the EU, but then reinstates it immediately until the end of 2020 when the transition period ends

It contains language on how the new protocol on Ireland - setting up what amounts to a customs and regulatory border between Northern Ireland and Great Britain - will work in practice

It sets out areas in which the European Court of Justice still plays a role in the UK, and makes the withdrawal agreement in some respects "supreme" over other areas of UK law

One of those areas may be in the arbitration procedure for disputes about the withdrawal agreement. The bill introduces a duty for the government to report on this

It prohibits any extension to the transition period beyond the end of 2020, even if a free trade deal isn't ready in time

In the section on citizens' rights it sets up an independent monitoring authority (IMA) with which EU nationals in the UK can lodge any complaints about the way the government treats them

In several policy areas, particularly in Northern Ireland, the bill gives ministers a lot of power to change the law (through secondary legislation) without MPs getting to vote

It introduces a duty for the government to report on its use of the arbitration procedure for disputes about the withdrawal agreement

What's been changed?

A number of clauses in the previous version of the bill have been removed. They include:

The possibility of an extension to the transition period and the procedures around that. The bill now prohibits ministers asking for an extension.

Workers' rights protections - the government says these will now be part of a separate bill.

Checks and balances that MPs were offered as an inducement to pass the old bill in October. For example, the requirement for the government's negotiating position on the future relationship with the EU to be approved by Parliament has gone. And the government's position no longer needs to be in line with the political declaration - the non-legally binding document that accompanied the withdrawal agreement and sets out aspirations for the future relationship.

A clause on child refugees. The bill removes the requirement, introduced by Lord Dubs, to agree a deal that if an unaccompanied child claims international protection in the EU, they may come to the UK if they have relatives living in the country. The new bill only requires a government minister to make a statement setting out policy on the subject within two months.

Between 2016 and 2018, 426 unaccompanied children came to the UK in this way.

Transition period

After the WAB becomes law, the withdrawal agreement also needs to be ratified by the European Parliament.

Then the stage will be set for Brexit on 31 January, when the post-Brexit transition period will begin.

For 11 months, the UK will still follow all the EU's rules and regulations, it will remain in the single market and the customs union, and the free movement of people will continue.

The challenge for the government will be to get all its new rules and policies in place by the end of this year.

This article was originally published on 21 October and has been updated to reflect changes to the Withdrawal Agreement Bill and its passage towards becoming law.

What claims do you want BBC Reality Check to investigate? Get in touch

Read more from Reality Check

Follow us on Twitter