Read the full text of the Brexit deal and its key points
Theresa May has persuaded her cabinet to accept a Brexit deal agreed with EU negotiatiors.
It still has to clear Parliament, and she will face strong opposition from some Tory MPs who are already thinking of a vote of no confidence.
So its by no means a done deal, but what kind of thing are we looking at?
If youve got time on your hands, you can read the full text of the draft here.
Otherwise (given it is more than 580 pages long), heres a summary of the key points.
When are we leaving?
Britain will leave the EU on March 29 next year, but remain inside the blocs single market and bound by its rules until the end of December 2020, while the two sides work out a new trade relationship.
The transition period can be extended by joint agreement before July 1, 2020 if both parties decide more time is needed.
Will there still be freedom of movement?
Yes, EU citizens living in Britain, and Britons elsewhere in the bloc, will continue to have the rights to live and work that they do now.
Immigration was one of the biggest issues in the Brexit vote, but there will be no change.
Avoiding any checks at the border between Northern Ireland and the Republic was one of the trickiest things for negotiators to solve.
The deal keeps the UK in a customs arrangement with the EU, and will last until superseded by permanent new trade arrangements.
It includes a backstop solution where Northern Ireland will keep EU trade rules even if the rest of the UK moves away from them. Both sides say they hope to have a new deal in place by the end of 2020, so the backstop is never needed.
Britain agrees to cover contributions to staff pensions and commitments to EU programs the UK made while a member for the funding period that runs to 2020.
The bill has previously been estimated at about £39 billion.
A seven-page declaration says Britain and the EU will seek a free trade area combining deep regulatory and customs cooperation, and ambitious, comprehensive and balanced arrangements for the services sector.
Other ambitions include visa-free travel for short-term visits, smooth rail road, air and sea transport and comprehensive, close, balanced and reciprocal law enforcement and judicial cooperation.