T O PUT IT mildly, Theresa May’s government is not fully in control of Britain’s separation from the EU . On December 4th MP s voted, for the first time ever, to hold the government in contempt of Parliament for refusing to publish legal advice about the withdrawal agreement from the attorney-general. Then they voted themselves a larger say in the whole process. On December 11th (unless the vote is postponed, which is unlikely), MP s seem sure to reject the deal that Mrs May has spent the past year and a half crafting. What then?

Defeat is likely because a group of hardline Eurosceptics in the Tory party loathe the deal—as does the Northern Irish Democratic Unionist Party ( DUP ) that props up the government. They fear that the “Irish backstop” (an arrangement crafted to avoid any risk of a hard border between Ireland and Northern Ireland) could keep Britain locked in a customs union with the EU indefinitely, robbing them of their dreamed-of clean Brexit. It looks as though almost every Labour MP will vote against the deal as well. So will a small band of Tory Remainers.

What happens next will depend partly on the margin of defeat. Thanks to some careful expectations management this week, a loss by 50 votes or less might almost resemble a victory for the government, allowing it to fight on. If the government is defeated by close to 100 votes, though, it would be a shattering blow. The result would be political chaos, perhaps leading to Mrs May’s ousting, a snap election or a second referendum.

In the more benign of the two vote outcomes, Mrs May would go back to Brussels to seek some modest changes to the deal. This has, after all, happened before for governments having trouble ratifying treaties such as those of Maastricht, Nice and Lisbon. Conveniently enough, the next EU summit meets just two days after the vote. Although Brexit is not on its agenda, leaders would surely discuss what they might be able to do to help Mrs May.

Yet little substantive change to her deal will be possible, says Charles Grant of the Centre for European Reform, a think-tank. The withdrawal agreement, a legally binding treaty that includes the Irish backstop, will not be rewritten. Any suggestion that Parliament should have a veto over entering the backstop will surely be rejected. It would be simpler to add material to the accompanying political declaration on the future relationship between the EU and Britain. This could include more promises about a future trade deal. But because the declaration has no legal force, such cosmetic changes may not count for much back home.

So Mrs May will have to find other ways to win over votes in Westminster. One possibility would be to point to rattled markets, which in 2009 persuaded legislators in America to back the TARP financial-rescue plan. Yet markets have priced in the likelihood of a defeat next week. Many analysts still think Mrs May’s deal will eventually go through (Malcolm Barr of J.P. Morgan puts the chances at 50%), and the risk of Britain leaving without a deal has been largely discounted.

Mrs May will first try to convince enough Brexiteers that all alternatives to her deal are worse. For months she has insisted that the options are her deal or no deal. That does not frighten the hardliners in her party, who would welcome the latter. So she has taken to adding a third option. If her deal is rejected, she says, Britain might not leave the EU at all. That prospect, combined with fears that chaos when the deal fails could mean a Labour government, might tip a few Brexiteers back into her lobby, if only to ensure that Brexit in some form still happens next March.

Yet, especially if her defeat next week is large, none of this is likely to work. So what then? A first answer is more political turmoil. Mr Corbyn will probably table a motion of no confidence in the government. This would fail unless the DUP supported it, which seems unlikely. Rebellious Tory MP s could, however, amass the 48 letters that are required to trigger a leadership contest. Mrs May could win any race. But she could also be forced out, or she might choose to resign. Whatever happens, the threat of another election would also loom. The Tories and the DUP would resist one, but public pressure for a poll could rise.

Meanwhile, the Brexit clock would keep ticking. In the absence of legislation that states otherwise, Britain will leave the EU next March. That means the risk of a no-deal Brexit is still there. MP s have made clear that they do not want this—one of the amendments passed on December 4th gives Parliament more control in the event that Mrs May’s deal fails. MP s could also refuse to pass laws to soften the impact of a no-deal Brexit. But none of this is enough on its own. Unless the government itself proposes legislation to stop a no-deal Brexit, it could still happen.

Other options appear more attractive. One is to switch horses to a different deal. The most talked-about is the “Norway option” of joining the European Economic Area. This has the advantage of being an existing model. But it would take many months to negotiate, it would mean accepting free movement of people and it too would require an Irish backstop. As Mrs May has been at pains to point out, this is true in spades for any other deal, especially for the looser Canadian-style free-trade deal favoured by many Brexiteers. If this were to avoid both an Irish border and hiving off Northern Ireland under separate governance, it would need a backstop even more intrusive than her deal.

Such problems point to other choices if the deal cannot pass muster. The one likely to be demanded by Mr Corbyn is a general election that might be fought on the principle of accepting or rejecting Mrs May’s deal. But no election is fought on just one issue, so it would be hard for voters to send a clear signal about Brexit. Hence the appeal of an alternative: a second referendum. Labour is moving slowly towards endorsing this idea if it cannot have an election. Yet it too has problems, notably over the terms of the question and the timing (see box).

All alternatives to Mrs May’s deal have one thing in common: the need for more time than is available before Brexit takes place on March 29th 2019. There has long been debate about whether and how to extend the two-year time limit set by Article 50 of the EU treaty. Mrs May insists it will not happen. The treaty allows it, subject to the unanimous approval of other EU governments. In Brussels it is assumed this would be forthcoming for an election, a referendum or a longer period of ratification—but maybe not for continuing debate about what Britain wants. A complication is the European Parliament elections in late May. If Britain were still a member of the club, it might have to hold elections that would be embarrassing and deprive other countries of British seats that are being reallocated.

A new factor entered the calculations this week from Luxembourg. In a case originating from Scotland, an advocate-general of the European Court of Justice advised that Britain has the unilateral right to revoke its Article 50 letter, subject only to a requirement not to do so abusively (eg, revoking the letter only to resubmit it). His opinion is usually followed by the full court. This would mean that, if up against the deadline, any British government could avert a no-deal Brexit by seeking parliamentary approval to withdraw the letter. But the consequence would be that Britain would remain in the EU .