Who will be prime minister on Thursday morning?

Theresa May would be expected to remain in post, even if she was defeated by a majority of her MPs on Wednesday evening.

If May wins the confidence vote, her position will be temporarily strengthened, and she will go to Brussels for the European summit on Thursday and Friday, hoping to secure compromises over her unpopular Brexit deal.

If she is defeated, constitutional convention is that the prime minister remains in place until they can recommend to the Queen a successor who can command a majority in the House of Commons. There is no provision for interim leaders.

May would be a lame duck in office, unable to achieve anything of substance until the Conservatives pick a new leader. Ministers would also be unsure of their positions, as they are dependent on the prime minister for their jobs.

David Cameron remained in post for three weeks after he resigned following the 2016 EU referendum, until May emerged as the only candidate standing.

What would happen to the Brexit talks?

A May victory would prevent any leadership challenges, under Conservative party rules, for another year. It would strengthen her hand in dealing with Brussels, and allow her to say: you can see how much I need your help in avoiding a no-deal scenario, and getting Brexit through.

If May was defeated, the Brexit talks, and indeed government, would grind to a halt, as any serious negotiations would have to wait for a new leader to be in place. Conservative party rules state there are two parts to a leadership contest: any number of MPs can stand and then all the party’s 315 MPs vote to whittle that down to two.

That can be achieved by Christmas, but then there would normally have to be a ballot of members over the holiday season and not concluding until early January – unless one of the final two candidates drops out to speed up the Brexit talks.

If there is a new leader, is the only realistic option no deal?

There are two immediate possibilities for a new leader. A cabinet member could try to broadly follow May’s path – in trying to wring some concessions out of the European Union over the unpopular backstop, sign a revised exit withdrawal agreement, and concentrate energies on securing a new free trade deal.

But they would still have to get the deal through parliament, running the gauntlet of both Labour and the hard Brexit faction in the Tory party. At present, there is no parliamentary majority for May’s deal or anything similar.

There is no set date for a new meaningful vote, although May said she would hold it before 21 January. A new leader could set the meaningful vote back to close to the 29 March 2019 exit deadline, although that would be politically controversial, and make it difficult to get any required Brexit legislation through the Commons.

Brexiter candidates such as Boris Johnson and Dominic Raab say they want to ditch the Northern Ireland backstop entirely, which the EU has so far said it is not prepared to do. Given that a change of heart is unlikely, the most likely alternative is a so-called “managed no-deal” in which the UK would withhold the £39bn due to the EU and seek to mitigate border, travel, security, trade and other risks.

Few believe that Britain is properly prepared for no deal, and there have already been warnings about food and medical supplies, among other things. But while there is not a majority in parliament for no deal, it is not obvious MPs can prevent it happening particularly if time runs out.

What about suspending article 50 and so suspending Brexit?

The UK can ask for an extension to article 50 – the clause that allows the UK (or any other country) to exit the EU to allow more time for negotiations. This, however, needs a majority of EU countries to agree and it is generally believed that the EU will only do so if there is going to be a clear outcome at the end of a period of delay.

That could mean a second referendum, or another general election, if either were to happen quickly. But elections for the European parliament are due in May and a new commission will be selected in the summer, so the only option thought realistic until now was to have a short pause.

A more radical option would be to start again. The UK would revoke article 50 – that it can do so was confirmed by a court ruling earlier this week – stopping the clock entirely. The idea is that a new prime minister could then trigger article 50 again, starting a two-year negotiating period.

But this process could be subject to legal challenge, and this week’s court ruling said article 50 had be used in “good faith,” meaning that cancelling it and re-triggering it just to buy more time may not be legal.

It is also not obvious that there would be any political goodwill in the ensuing talks with the EU. Brussels could harden its position in a second round of Brexit talks.

What about having a second referendum or a general election, or even cancelling Brexit?

A new leader could opt for a second referendum or seek their own mandate for Brexit in a general election. The former would require special legislation and the latter may not be attractive unless the a new Conservative leader was sure of winning it.

Both options could help produce a clear direction for a divided country, although a close referendum result or another hung parliament would probably make governing even harder than it is for Theresa May now.

The easiest solution, arguably, would be to cancel Brexit altogether, although this is not a serious proposition for now as all the Conservative candidates for the leadership will argue that the result of the 2016 referendum must be respected.