European Union leaders have finally endorsed a treaty setting terms for Britain's withdrawal in March and an outline of a future EU-UK trade pact.
In the more than two years since the Leave side won the UK's Brexit referendum you could be forgiven for losing track.
So if you're feeling bewildered by Brexit, here's a really simple guide.
Why is the UK leaving?
The UK joined the EU, then known as the EEC (European Economic Community), in 1973. Member states trade with each other and allow anyone to move easily between the countries to live and work.
A referendum was held on Thursday 23 June 2016 when voters were asked just one question - whether the UK should leave or remain in the European Union.
The Leave side won (by nearly 52 percent to 48 percent) but the exit didn't happen straight away - it's going to happen on 29 March 2019.
What has happened so far?
The vote was just the start. Since then, negotiations have been taking place between the UK and the other EU countries.
The discussions have been mainly over the "divorce" deal, which sets out exactly how the UK leaves the EU - not what will happen after it leaves.
This deal is known as the withdrawal agreement.
What has been agreed?
The UK and the EU have come up with a withdrawal agreement about how the UK leaves the EU covering some of these key points:
- How much money the UK will have to pay the EU in order to break the partnership - that's about £39bn
- What will happen to UK citizens living elsewhere in the EU, and equally what will happen to EU citizens living in the UK
- It suggests a way of avoiding the return of a physical border between Northern Ireland and the Republic of Ireland
A transition period has been agreed to allow the UK and EU to make a trade deal and to give businesses the time to adjust.
That means that if the withdrawal agreement gets the green light, there will be no huge changes between 29 March 2019 and 31 December 2020.
Another, much shorter, document has also been drawn up that gives an overview of what the UK and EU's future relationship will be in the longer term.
This is the political declaration. However, neither side has to stick exactly to what it says - it is a set of ambitions for the future talks.
What happens next?
Now that leaders of the other 27 EU countries have signed off the withdrawal agreement and political declaration, UK Prime Minister Theresa May needs to persuade MPs in her own Parliament to back it.
A vote is expected to happen in December.
The deal also needs to be approved by the European Parliament - one of the organisations which helps make EU laws.
Its 751 members (known as MEPs) come from the EU and are elected in their own countries.
The European Parliament will vote on the deal early next year and the members are expected to follow their leaders by backing the deal.
Will the deal get through UK Parliament?
Well, at the moment it looks like it might not.
Mrs May doesn't have enough support from her own Conservative MPs or MPs from other parties.
There are a broad range of complaints, many of which are about the deal failing to give the UK control back from the EU.
What happens if Parliament rejects the deal?
It's not very clear.
The default position in this case would be for the UK to leave without a deal.
But MPs would have up to 21 days to suggest a way forward.
So the UK will definitely leave on 29 March 2019?
It is written into law that the UK will be leaving on that date at 11pm UK time.
But if there is no deal, or Parliament rejects the deal, it is impossible to say with any certainty what will happen next.
The deadline of 29 March 2019 could be extended - but all 28 EU members would have to agree.
Other possibilities include the prime minister being allowed to have a second go at getting her deal accepted by Parliament.
Or one other suggestion is a fresh referendum, possibly asking voters whether they approve of the deal, rather than re-running the original vote.
What happens if the UK leave without a deal?
"No deal" means the UK would have failed to agree a withdrawal agreement.
That would mean there would be no transition period after 29 March 2019, and EU laws would stop applying to the UK immediately.
The government has started planning for this potential situation.
It has published a series of guides which cover everything from pet passports to the impact on electricity supplies.
Labour leader Jeremy Corbyn says it will be a "national disaster" if the UK leaves without a deal.
But other MPs have played down the warnings of chaos and want a "clean break" from the EU.
Anything else to know?
Northern Ireland has featured heavily in discussions about Brexit.
Both the UK and the EU want to avoid a physical border - with guard posts and checks - between Northern Ireland and the Republic of Ireland (here's why).
But trying to find a way to avoid this if the UK leaves the EU without agreeing a trade deal has proved problematic.
So they've agreed to put in place a backstop - that's a sort of safety net to make sure a hard border never happens.
It would mean that Northern Ireland - but not the rest of the UK - would still follow some EU rules on things such as food products.
The Northern Ireland "backstop" is meant to be a last resort - the prime minister insists that if all goes as planned it will never be used.