In the tense period between now and the House of Commons vote on the Prime Minister’s Brexit deal with the EU, politicians and commentators are contemplating the effects of a government defeat that could trigger a constitutional crisis with uncertain outcomes.

Among the scenarios that might arise is Theresa May’s resignation as Prime Minister, if (as with David Cameron in 2016) her position becomes politically untenable and (as with Margaret Thatcher in 1990) she loses the support of her Cabinet.

Her shallow leadership victory on 12th December by 300 votes to 117 (with a majority of her colleagues not on the government payroll voting against her) by no means guarantees her survival in the months ahead.

If she is compelled to resign office, the Conservative Party will immediately proceed to elect her successor as party leader, and the Queen would then appoint that person as Prime Minister.

Meanwhile Jeremy Corbyn is almost certain to table a House of Commons motion of no confidence in the government. This would be expressed in the traditional wording as codified in the Fixed-term Parliaments Act, “That this House has no confidence in Her Majesty’s Government”.

This will be Labour’s bid for a general election, for if that motion is passed (which would need the help of other opposition parties and perhaps some dissident Conservative backbenchers), the Act requires an election to take place, subject to one proviso: that an alternative government, endorsed by a majority confidence resolution taking place within 14 days, can be formed out of the existing House of Commons.

There would therefore be a two week interval in which an alternative Conservative government under a swiftly-elected new leader might be formed, which would need to rely on a freshly negotiated “confidence and supply” agreement with the DUP. If the necessary confidence resolution were then passed in the Commons, the Queen would invite the newly elected Conservative leader to Buckingham Palace to be formally appointed Prime Minister.

Mr Corbyn himself could attempt to construct a government during this 14-day period, presenting itself in a confidence motion in the Commons. This would be most unlikely to succeed, since to secure the necessary Commons majority, he would need to negotiate an agreement with all the other parliamentary parties not in government. Mr Corbyn has stated that if there is no majority for any of the Brexit options voted on in the Commons his preference is for a general election, though this was expressed as an alternative to any suggestion for a referendum to resolve the impasse.

Throughout all these scenarios there will be no personal intervention by the Queen as head of state. If any faction in the Commons attempts to make an appeal to the monarchy to mediate any difficulties arising, this should be firmly rebutted as out of time and contrary to the law and working of our contemporary monarchy.

The role of the monarchy today where the life of a government is at stake is ceremonial only, with a duty simply to formalise the outcome of decisions resolved politically within and across the parliamentary parties in the Commons.

Each and all of the scenarios that might arise if the government’s Brexit deal is voted down on 11th December will be settled ultimately by a vote and resolution in the House of Commons. If party leaders and the House of Commons choose to absolve themselves from being able to reach any conclusion over Brexit, they can agree to refer the options back to the people.

A referendum to resolve the parliamentary deadlock therefore remains a strong possibility. Despite Theresa May’s dismissal throughout 2018 of the proposal for a “people’s vote”, she may come to be persuaded of its tactical necessity by Cabinet colleagues; and should she resign as party leader, so might her successor.

In the scenario of a no confidence resolution triggering a general election that Labour then won, the in-coming Jeremy Corbyn government might call a second referendum as a means of superseding the democratic authority of the 2016 poll and for popular endorsement of its own negotiated UK-EU agreement, one that accorded with the Labour leadership’s stated objectives of maintaining the benefits of the single market and customs union.

The remaining issue would be the options to be set out on the referendum ballot paper. A Conservative government is likely to offer a choice between its current negotiated agreement with the EU and a no-deal departure, whereas an in-coming Labour government might offer an endorsement for Brexit and own freshly negotiated UK-EU agreement – or remaining in the EU.

By Robert Blackburn QC LLD, Professor of Constitutional Law, King’s College London. This piece originally featured in the Times.