The UK parliament has finally agreed to put the deal struck with the European Union over Brexit into law. Here's a guide to what is in the European Union (Withdrawal Agreement) Bill.
In very simple terms
The European Union (Withdrawal Agreement) Bill puts into UK law what is commonly known as the Brexit deal agreed by the UK and the European Union. It also gives the UK government the go-ahead to sign the deal, which is in the form of an international treaty, setting out the terms of the UK's departure from the European Union, which is due to happen at 23:00 GMT on 31 January.
So does everything change at 23:00 GMT on 31 January?
Technically the UK will be out of the European Union at that moment but, in reality not much will change overnight. The bill provides for a transition period to last until 23:00 GMT on 31 December 2020. During this time, pretty much everything will continue the same for the UK and European Union in terms of day-to-day life - but the UK will no longer be a member of the European Union, so it will not be taking part in policy-making processes or have members sitting in the European Parliament.
What are the key elements of the bill?
* The bill repeals the European Communities Act (ECA), which is the one which took the UK into what became the European Union, back in the early 1970s. It then puts the ECA back into force until the end of the year.
* It also says that the UK cannot extend the implementation period beyond the end of the year.
* The bill puts into law the Brexit deal on EU citizens' rights and sets up an independent body to monitor the implementation and application of the citizens' rights deal the UK has agreed to.
* There is an undertaking that EU citizens will have until at least the end of June 2021 to register with the EU settlement scheme, which is how they get settled, or pre-settled, status and the right to remain in the UK.
* It ensures that goods placed on the UK or EU market under EU law before the end of the implementation period may continue to circulate freely between the UK and the EU until they reach their end users.
* The mechanism for calculating the "divorce payment" the UK will have to make to the EU is set out and power is given for the UK to make the payments due. It does not include a final figure, but it will be in the tens of billions, and paid over a period of many years (the payments are for things such as the UK's share of pension payments for staff who have worked for the EU during the 46+ years of UK membership).
* The bill also includes the arrangements for Northern Ireland designed to ensure there is no return to a visible border on the island of Ireland.
So what happens after 31 December 2020?
That is the big question. The focus so far has been on agreeing on the "divorce" terms, and now that has been pretty much agreed, it is time for the two sides to agree on what sort of relationship they are going to have in the future.
The transition period has been established to try and give time for the new arrangements to be agreed and to smooth the changes, but many experts still see it as a tall order to get complex agreements on issues such as trade and security relations agreed by the end of the year.
So if you thought you'd heard the last of Brexit...