By Peter Barnes Senior Elections and Political Analyst, BBC News
MPs will vote on the proposed Brexit deal, agreed by the UK and the EU, on 11 December. If they reject it then a lot of different things could happen.
The EU Withdrawal Act, passed by Parliament in June, sets out some rules. The government would have to produce a new plan of action within 21 days and then allow a further vote within another seven sitting days in the House of Commons.
However, the government could act much more quickly than that. And it's possible that political events would transform the situation.
There are a number of possible outcomes if MPs fail to back the deal - but here are six of the most likely ones:
1. No deal
If nothing else happens, the default position would be a no-deal Brexit. The law is already in place which means the UK will leave the EU on 29 March 2019. And, in any case, EU rules mean the UK would leave then.
The government would probably want to pass some legislation to prepare for no-deal but that's not strictly essential.
If MPs aren't happy with the plan they could try to put pressure on the government to change its mind. Their ultimate sanction, if the government wouldn't budge, would be a vote of no confidence - see section five below.
2. Second vote on the deal
It's been suggested that the government could try to bring back the deal for another attempt to get it through.
That's not completely straightforward because there's a principle that MPs shouldn't be asked to vote twice on the same issue during a single session of Parliament.
However, if the government could persuade the EU to make some change to the deal - perhaps a tweak to the non-binding political declaration element - it could be brought back.
The Clerk of the House of Commons has also said the normal rule could be ignored if it "plainly was the will of the house" to overturn its previous vote.
MPs might prefer a different course of action though. And the government couldn't just hold repeated votes in the hope of getting a different outcome.
3. Major renegotiationThe government could propose a more thorough renegotiation.
As described above, a small change might allow them to return to the Commons for another vote within a few weeks. However, if the plan was to seek a more wide-ranging renegotiation it would clearly take longer.
That might well require an extension of Article 50 to delay Brexit.
This would require two key steps. First, the UK would have to make a request to the EU for an extension. This could be granted but only if all EU countries agree at a vote of the EU Council.
Second, the government would have to table a statutory instrument to change the definition of "exit day" in the EU Withdrawal Act. MPs would get a chance to vote on this change.
If the EU refused to re-enter negotiations, the government would have to plump for one of the other options instead.
4. Call for a general electionTheresa May could decide that the best way out of the deadlock would be to hold an early general election - in order to get a political mandate for her deal.
She doesn't have the power just to call an election. But, as in 2017, she could ask MPs to vote for an early election under the terms of the Fixed Term Parliaments Act.
Two-thirds of all MPs would need to support the move. The earliest date for the election would be 25 working days later but it could be after that - the prime minister would choose the precise date.
As with the "renegotiate" plan, this course of action could also involve a request to the EU to extend Article 50.
And it's not the only way an election could come about.
5. Vote of no confidence
If the proposed deal is rejected the opposition could call for a formal vote of no confidence. Mrs May could even call for a vote herself to try to reinforce her authority.
The rules, under the Fixed-Term Parliaments Act, mean there are several possible outcomes if the government loses a formal vote of no confidence.
If no government is able to win a vote of confidence within 14 days - and that means neither the existing government nor any alternative - then there would be an early general election. The earliest possible date for the election would be 25 working days later.
However, if the government wins a confidence motion within this 14-day period, perhaps by offering some new concession, it carries on.
The final possibility is a change of government. That could mean another minority Conservative government with a different prime minister, a coalition government, or a minority government of a different party which had the agreement of others to back it in a confidence vote.
Clearly, any new government could have a different Brexit policy so the various options could be re-opened.
6. Another referendum
The government could instead choose to have another referendum.
As with a renegotiation or early election, this might well require an extension to Article 50. It's probably already too late to hold a referendum before 29 March.
And it can't just happen automatically. The rules for referendums are set out in a law called the Political Parties, Elections and Referendums Act 2000.
There would have to be a new piece of legislation to make a referendum happen and to determine the rules, such as who would be allowed to vote.
It couldn't be rushed through because there has to be time for the Electoral Commission to consider and advise on the referendum question.
The question is then defined in the legislation.
Once the legislation has been passed the referendum couldn't happen immediately either. There would have to be a statutory "referendum period" before the vote takes place.
Experts at University College London's Constitution Unit suggest that the minimum time for all of the required steps above is about 22 weeks.
Even if that could be shortened a little, it would still take us well beyond the end of March.
7. Other consequences
As well as the various options for what could happen with Brexit, there could be a lot of other political events going on as well.
It's possible, for example, that Theresa May will face a leadership challenge.
If 48 Conservative MPs write to the chairman of the 1922 Committee there would be a vote of no confidence in Mrs May's leadership among the parliamentary party.
This would be completely different from any parliamentary vote of no confidence. But it could also result in a change of Conservative leader and, hence, change of prime minister.
Whoever ended up in charge would still face the same basic range of options.