Theresa May has agreed on a draft Brexit withdrawal agreement with Brussels. Her cabinet backed it on Wednesday - but there have since been resignations.
Two cabinet ministers and two junior ministers have resigned over the deal - while some Conservative MPs have attempted to force a leadership contest by writing letters of no confidence in the prime minister. What happens now?
The basics: A reminder
The UK is due to leave the European Union at 23:00 GMT on Friday 29 March 2019, after people voted by 51.9% to 48.1% for Leave in the 2016 referendum. The UK and the EU have spent more than a year trying to agree on how the divorce - as it's often called - will work in practice. Mrs May announced that a deal had been reached, and approved by cabinet, on Wednesday evening. But two cabinet ministers have since resigned. The deal would also need to get the stamp of approval from MPs and, finally, the 27 other EU member states.
What has been agreed between the UK and EU?
A draft agreement on Britain's withdrawal from the European Union - including how much money will be paid to the EU, a 21-month transition period after Brexit day next March and commitments on the rights of EU citizens in the UK and UK citizens living in the EU. It is not a trade deal - that will be hammered out during the transition period if all goes as planned. They have also agreed to the text of a separate, shorter statement on the UK's future relationship with the EU, including the kind of trade deal the two sides want.
So what about a trade deal?
Alongside the 585-page withdrawal agreement is a five-page "political declaration" setting out what future UK and EU relations will look like. This is a broad outline and is not binding - the details of a trade deal will be worked out during the transition period with both the EU and UK hoping to have an agreement in place by December 2020. The political declaration envisages "a free trade area and deep co-operation on goods, with zero tariffs and quotas". There would be "ambitious customs arrangements" that "build on" the arrangements in the withdrawal agreement. The two sides say they want this new arrangement to solve the Irish border problem, removing the need for that troublesome backstop.
So what happens next?
Any vote is expected to take place around 7 December. Mrs May does not have a Commons majority and many MPs on her own side - as well as Labour and the other opposition parties - are sceptical about her Brexit plans, or openly hostile to them. The DUP, which Mrs May relies on key votes, has already said it is likely to vote against it, claiming it will lead to the break-up of the United Kingdom. A number of Conservative MPs on both the Remain and Leave wings of the party have also said they will vote against it. If Mrs May loses the vote, we enter uncharted territory. She may seek to renegotiate with the EU but most expect her time in No10 to end. There could be a general election and/or a new prime minister. Some Tory and Labour MPs hope Mrs May will head that off by postponing Brexit day and calling another referendum, something she has consistently ruled out. On Thursday EU leaders played down talk of renegotiating the deal, with German Chancellor Angela Merkel saying there was "no question" of reopening talks. Mrs May herself said that if MPs did not unite behind the agreement, "nobody can know for sure the consequences that will follow" and it would mean taking "a path of deep and grave uncertainty".