Great Repeal Bill: All you need to know
The day after triggering Brexit, the government has published details of its "Great Repeal Bill".
Described by Theresa May as an "essential step" on the way to leaving the EU, it aims to ensure European law will no longer apply in the UK.
Here's how it will work:
What it's all about
As the name suggests, the Great Repeal Bill will repeal the 1972 European Communities Act, which took Britain into the EU and meant that European law took precedence over laws passed in the British parliament. It will also end the jurisdiction of the European Court of Justice.
All existing EU legislation will be copied across into domestic UK law to ensure a smooth transition on the day after Brexit.
The government says it wants to avoid a "black hole in our statute book" and avoid disruption to businesses and individual citizens as the UK leaves the EU.
The UK Parliament can then "amend, repeal and improve" the laws as necessary.
Ensuring the continuity of EU rules and regulations is also meant to aid trade negotiations with the EU because the UK will already meet all of its product stands.
The Great Repeal Bill is likely to be "one of the largest legislative projects ever undertaken in the UK", a report by the House of Commons library predicts, with "major swathes of the statute book" needing to be examined to see how they will work after Brexit.
This is because working out which bits of UK law came from the EU is not as simple as it may sound.
In fact, it presents a "unique challenge", a House of Lords committee warned recently, because "the body of EU law is found in a number of different places, and in a number of different forms".
Simply transposing all EU law into UK legislation will not be enough, the government's white paper on the bill says.
Swathes of UK law "will no longer work" on exit, for example because they refer to EU institutions.
Not all of this can be done through the Great Repeal Bill, so the government plans to create powers to "correct the statute book where necessary" - without full Parliamentary scrutiny.
This is the one of the most controversial features of the bill (see below).
More complications are presented by the government's negotiations with the EU, which will be taking place while the bill is passing through Parliament.
Those talks could shape what the UK's post-Brexit laws look like - but the Great Repeal Bill will need to be done and dusted by the day the UK leaves.
What's Henry VIII got to do with it?
The government plans to enact its "corrections" to the statute book using what are known as Henry VIII powers, after the Statute of Proclamations 1539 which gave him the power to legislate by proclamation.
Given that this will not involve the usual Parliamentary scrutiny process, opposition parties have protested, with Labour claiming ministers were being handed "sweeping powers" to make hasty, ill thought-out legislation.
Ministers have attempted to reassure critics by saying such measures will be time limited and not be used to make policy changes.
In total, the government estimates that 800 to 1,000 measures called statutory instruments will be required to make sure the bill functions properly.
How much EU law is there?
The government's white paper says there is "no single figure" for this, but that there are believed to be 12,000 EU regulations (one type of EU law) in force, while Parliament has passed 7,900 statutory instruments implementing EU legislation and 186 acts which incorporate a degree of EU influence.
The total body of European law, dating back to 1958, is known as the Acquis Communautaire.
It binds all member states and in 2010 was estimated to consist of about 80,000 items, covering everything from workers' rights to environment and trade.
As well as regulations, this includes EU treaties, directions and European Court of Justice rulings.
New EU legislation is being created all the time and will continue to apply in the UK until it leaves.
Different types of EU legislation work in different ways, and will be treated differently by the bill. So regulations, which apply automatically in the UK, will be converted into UK law.
But directives require a new UK to come into force - this legislation will be preserved by the bill.
What's happening when?
The bill will be included in the next Queen's Speech (expected in the spring) and will then have to pass through both Houses of Parliament. The plan is for it to be passed ahead of the UK's exit from the EU but to become law only when it actually leaves.
Under the formal timetable for negotiations, the UK is due to leave the EU in March 2019 unless both sides agree to an extension.
What else do we know?
The white paper confirmed the government intends to pass a number of other bills over the next two years to prepare for specific aspects of Brexit, including on customs and immigration.
The government also confirmed the UK would be withdrawing from the EU's Charter of Fundamental Rights, the EU's human rights agreement, and that it would not be converted into UK law.
The government said the charter was "only one element of the UK's human rights architecture" and it had no plans to pull out of the European Convention on Human Rights, a separate agreement which is not part of the EU.
Ministers have also clarified that once the UK leaves the EU, European Court of Justice judgements will have the same status as UK Supreme Court decisions, which can be overturned by subsequent rulings.
For the record, we also know the Great Repeal Bill won't actually be called the Great Repeal Bill - because the word "great" is not permitted under Parliamentary drafting rules.
UK bills must describe the content of the bill in a straightforwardly factual manner, with no "slogans" permitted, so we we can expect a more technical title.
Until the UK actually leaves, EU law will continue to apply. But after leaving, the Repeal Act (as it will be by then) comes into force.
The government says having the legislation in place will ensure a "calm and orderly exit". Then begins the long-term process of the government, and Parliament, choosing what it wants to do with the laws it has incorporated from the EU.
With so many pieces of legislation to be considered, this could turn out to be a "major drain on resources" and should not "crowd out" other government policies, the Institute for Government think tank has warned.
How about Scotland, Wales and Northern Ireland?
Some of the EU laws are in areas that are controlled by the devolved administrations - so do they now become part of Westminster law, or will they be added to the statute book in Scotland, Wales and Northern Ireland?
It's not entirely clear how this will work, although the government says it will work closely with the devolved administrations.
It also predicts the repeal process will result in a "a significant increase in the decision-making power of each devolved administration", as powers in devolved areas are repatriated from Brussels.
But the bill has been described by the Scottish government as an "executive power grab".
It has warned it could block the legislation if Scotland's interests are not represented in the negotiations, assuming its consent is required before it becomes law.
Unveiling the white paper in Parliament, Mr Davis did not respond directly when asked by the SNP if the devolved administrations would have to give their consent to the bill, although ministers have previously suggested consent would be needed.
The UK government says blocking the bill could have "very significant consequences", leaving "a hole in our law".