By their own account, Labour had a great night on Thursday. They outperformed nearly every major pollster’s predictions to gain 30 seats across the country and crucially, denied the Tories the majority many thought was in the bag.

Theresa May faces an extremely uncertain future. She spent yesterday trying to convince rank-and-file Tories to back her proposed agreement with Northern Ireland’s Democratic Unionist Party, whose ten MPs now hold the balance of power in the Commons.

Three things could happen that could force Mrs May out of 10 Downing Street now: she could lose a Tory leadership election; she could call another general election and lose; or she could lose vote of no confidence in the House of Commons.

Jeremy Corbyn’s most straightforward route to Downing Street is through another general election. A poll for the Mail on Sunday by Survation now puts Labour six points ahead of the Conservatives.

But without a second ballot, what are Mr Corbyn’s chances of getting into Number 10?

It’s in the DUP’s interest to back the Tories

The Tories have asked the DUP for a “confidence and supply” arrangement with their ten MPs. This means they’ll support the government in the event of no confidence vote and in passing money bills, such as the Budget and other major pieces of legislation.

This type of arrangement isn’t as binding as a formal coalition deal, like the one we saw under Cameron and Clegg. It’s unlikely, for instance, that any DUP MPs will be offered positions in Cabinet.

But once an agreement is finalised, it will be in neither parties’ interest to renege: the Conservatives will want to remain in power, and the DUP will want to retain their position as parliamentary kingmakers.

And the DUP have reportedly pledged to back the Tories for as long as Jeremy Corbyn leads Labour – not entirely surprising, given his lifelong support for a united Ireland, which the DUP reject.

The Fixed Term Parliament Act protects the government from no confidence votes

So both the Tories and the DUP will want to maintain their deal for as long as possible. But in the event that it fell through, Labour would still have to clear several constitutional hurdles to have a chance of forming a government. First of all, the Tories would have to lose a vote of no confidence.

In the past, parliamentary convention meant governments would resign if they failed to pass key pieces of legislation, like the Budget or Queen’s Speech. Not so today, says Colin Talbot, Professor of Government at the Universities of Manchester and Cambridge.

In his view, “under the Fixed Term Parliament Act the only thing that constitutes no confidence is what’s set out in the Act itself”. In other words, a majority of MPs must pass a motion saying “this House has no confidence in Her Majesty’s Government”.

The Act – which the Tory manifesto said the party would repeal – could play a key role in keeping a minority Conservative government in power.

As Professor Talbot notes, rebellious Conservative backbenchers might vote against the government’s legislation on individual issues, but they are much more likely to “return to the fold” in the event of a confidence vote.

So a Tory government will be constrained in what it can do (good news for those seeking a “soft” Brexit), but the Fixed Term Parliament Act means it’s unlikely to be forcibly removed from office.

The only other way that the Tories could lose a no confidence vote is if Theresa May proposes one herself. It’s not impossible – John Major did something similar over the Maastricht Treaty – and she may consider it a political necessity. But early indications suggest that she intends to stick around for the near future at least.

Labour would struggle to get other parties into deals, and wouldn’t have enough MPs to govern even if they did

But continuing the thought experiment for a minute longer, let’s imagine the Tories did lose a no confidence vote. Would Jeremy Corbyn automatically become Prime Minister?

Under the Fixed Term Parliament Act, the Tories would have fourteen days to regroup and try again to form a government. Failure to do so would trigger a second election.

Professor Talbot notes that the law doesn’t give a formal role to any other parties in this process. It doesn’t tell us what happens if someone other than the government reaches a deal that would give them control of the Commons. Professor Talbot suggests they’d have to sound out the Head of the Civil Service and then talk to the Queen. It would be uncharted territory.

But even then, the numbers won’t add up for a Labour.

Professor Talbot has crunched the stats on his blog, and explains that when you consider the Sinn Féin MPs that don’t take their seats (seven) and the Speaker (one) and Deputy Speakers (two), the total number of “opposition” votes in parliament stands at 313. That’s compared to the 326 MPs on the government’s side (Tories plus DUP).

So a Labour-led coalition or pact would already be 13 seats short, before we even consider the political reality of such a deal. You can see that below.

Less than an hour after that exit poll came out on Thursday night, the Liberal Democrats made clear that they would not be involved in any coalitions or deals, which puts a further 12 seats out of Labour’s reach. The SNP have said that they would back an “issue-by-issue” alliance with Labour, but that still wouldn’t be enough to take Corbyn over the magic majority threshold.

FactCheck verdict

Jeremy Corbyn’s best chance of becoming Prime Minister is following another election. The Fixed Term Parliament Act makes it unlikely that the Tories would be forced from government. Even if that happened, a Labour-led coalition wouldn’t have sufficient political backing from the other parties, nor would it have the numbers to make such a deal work.