The European Union has approved the UK's plan to leave the group.
There are 27 countries which are part of the EU and all of their leaders have backed the withdrawal agreement.
This agreement sets out the terms of Brexit - that's the UK's exit from the EU.
They've also approved the political declaration which outlines what the UK and EU's relationship might be like after Brexit.
The EU's chief official Donald Tusk announced the news on social media.
It took them less than an hour to decide at a meeting in Brussels, but the two sides have spent more than 18 months discussing how Brexit will work.
The deal now needs to be given the go-ahead by politicians here in the UK.
The UK Parliament is expected to vote on it on 12 December, but many MPs have already said they don't support it.
The prime minister has said that she will put her "heart and soul" into a two-week push to convince MPs to back the terms of the UK's withdrawal from the EU.
The UK is due to leave the EU on 29 March 2019.
If you cannot see the interactive activity on this page, click here.