Brexit: All you need to know about the UK leaving the EU
The UK is due to leave the European Union (EU) at 23:00 GMT on 31 October 2019. For those not following every twist and turn, this guide covers the basics.
What is Brexit?
Brexit - British exit - refers to the UK leaving the EU.
The rise of the word Brexit
What is the European Union?
The EU is an economic and political union involving 28 European countries. It allows free trade and free movement of people to live and work in whichever country they choose.
The UK joined in 1973 (when it was known as the European Economic Community). If the UK leaves, it would be the first member state to withdraw from the EU.
Why is the UK leaving?
A public vote - or referendum - was held on Thursday 23 June 2016, to decide whether the UK should leave or remain.
Leave won by 52% to 48%. The referendum turnout was very high at 72%, with more than 30 million people voting - 17.4 million people opting for Brexit.
EU referendum result
Why hasn't Brexit happened yet?
Image copyright Getty Images Image caption Theresa May lost the Tory majority after calling an early election in 2017
Brexit was originally due to happen on 29 March 2019. That was two years after then Prime Minister Theresa May triggered Article 50 - the formal process to leave - and kicked off negotiations. But the Brexit date has been delayed twice.
A deal was agreed in November 2018, but MPs rejected it three times.
What is the Brexit deal?
The deal consisted of a withdrawal agreement - which set out the terms for the "divorce" process. There was also a political declaration - which outlined the future relationship between the UK and EU.
The withdrawal agreement covered a range of things including:
the rights of EU citizens in the UK and British citizens in the EU
how much money the UK was to pay the EU (widely thought to be £39bn)
the backstop for the Irish border
What is Theresa May's withdrawal agreement?
Why did Parliament reject the Brexit deal?
The main sticking point for many Conservative and DUP MPs was the backstop.
Currently, there are no border posts or physical barriers between Northern Ireland and the Republic of Ireland. The backstop is designed to ensure that continues after the UK leaves the EU.
The backstop would only be needed if a permanent solution to avoid border checks could not be found. If it was needed, the backstop would keep the UK in a close trading relationship with the EU to avoid checks altogether.
But many MPs were critical. They said if the backstop was used, the UK could be trapped in it for years. This would leave the UK stuck in the EU's customs union, preventing the country from striking trade deals with other countries.
Their opposition eventually led to Theresa May's resignation.
Why is the Irish border blocking Brexit?
What deal does Boris Johnson want?
Prime Minister Boris Johnson, who took over from Mrs May, says the EU must remove the backstop from the deal.
Under his plan, Northern Ireland would stay in the European single market for goods but leave the customs union. This would mean new customs checks, most of which, Mr Johnson insists, could be done electronically and away from the border.
The EU is considering the plan, but has previously rejected a technology-led approach to custom declarations.
If the plan is rejected, Mr Johnson says the UK will leave on 31 October anyway.
What is Boris Johnson's plan to avoid a hard Irish border?
What are the customs union and the single market?
The customs union ensures that all EU countries charge the same taxes on goods coming in from outside. They do not charge taxes on each other's goods. But members cannot strike their own trade deals.
The single market enables goods, services, people and money to move freely between all EU member states. Most rules and standards are the same - that means goods don't need to be checked when they move around. It also means EU citizens can live and work in different EU countries.
What happens next with Brexit?
The UK government says it is focused on getting a new deal agreed at an EU summit on 17 October.
If the sides fail to reach a deal, Mr Johnson could be forced to seek a third Brexit extension.
That's because MPs have passed a law - known as the Benn Act - that requires Mr Johnson to ask for a Brexit delay by 19 October. This will push the deadline back from 31 October, to 31 January 2020.
MPs say the law is necessary in order to prevent a no-deal Brexit.
The PM will not have to write a letter if MPs approve a Brexit deal, or vote in favour of leaving with no deal.
Mr Johnson still insists the UK will leave at the end of October. It is unclear how this will happen if the law does require him to ask for an extension.
Can a no-deal Brexit still happen?
What is a no-deal Brexit?
What about an early election?
After MPs voted in favour of extending the Brexit deadline, Mr Johnson tried to call an early election.
But not enough MPs supported the PM. To trigger an early election at least two-thirds must back the idea.
Opposition MPs say won't back an election - or call for a vote of no confidence in the PM - until the law aimed at blocking a no-deal Brexit is implemented.
Could there be an early election?
What happens next?
Will a no-deal Brexit cause disruption?
If the UK leaves the customs union and single market on 31 October, then the EU will start carrying out checks on British goods. This could lead to delays at ports, such as Dover. Some fear that this could lead to traffic bottlenecks, disrupting supply routes and damaging the economy.
If the pound falls sharply in response to no deal and there are significant delays at ports, like Dover, it could affect the price and availability of some foods. There are also concerns over potential shortages of medicines.
Mr Johnson has tried to calm such fears by announcing an extra £2.1bn of funding to prepare for a possible no-deal outcome.
Many Brexit supporters say it is hard to accurately predict what will happen or believe any economic disruption will be short-term and minor.
But most economists and business groups believe no deal would lead to economic harm.