Almost three years have passed since Britain voted to leave the European Union, and yet we are still no closer to a Brexit resolution than we were on that June morning. No one is in control and this country’s whole system of governance is creaking. We are in an interregnum that shows no sign of ending.

What is remarkable about this moment in our history is that something must break the impasse. This means that, although Theresa May’s deal suffered the biggest defeat ever for a piece of government business and was defeated a second time by a three-figure margin, it is not dead yet.

Many cabinet ministers, including several of those who are very critical of May, think there is a chance that the deal will pass at the third time of asking. The theory goes that at the EU summit on Thursday next week, the EU will agree to Brexit being delayed but impose conditions. May will then return to ask Parliament if it wants to accept the EU’s terms or her deal.

Whatever extension the EU offers, ministers believe it gives them a chance of winning a meaningful vote. If it is a long extension, Brexit would be in sufficient danger that Jacob Rees-Mogg would — in the view of one cabinet minister — lead his foot soldiers into the division lobby to vote for the withdrawal agreement. Tellingly, Rees-Mogg has left himself a ladder to climb down, repeatedly saying that the only reason to vote for May’s deal is if Brexit is in danger. But if the extension on offer is a short one, May can recruit Remainers to her side by pointing out that a longer one is not on offer. This means she would be able to have a vote which would, effectively, be her deal vs no deal. In these circumstances, her deal would prevail.

Another theory doing the rounds among cabinet ministers is that May could make the next meaningful vote a free vote. It might seem bizarre to suggest that the way for the Prime Minister to win approval for her deal is to relax the whip. But advocates of this approach argue that the government doesn’t have much to lose: pretty much every Tory MP who wants to rebel already has. A free vote, however, would feel less partisan. This might encourage more opposition MPs to vote for the agreement. Tory whips suspect there are about 70 Labour MPs who don’t want a second referendum, and who might be joined by another 30 prepared to vote for May’s deal if they thought it might break the impasse. This is, essentially, what Ted Heath did in 1971. He offered a free vote for Conservative MPs on entry into the European Economic Community to make it easier for Labour MPs (such as Roy Jenkins) to back the government.

One cabinet proponent of this third-time-lucky plan tells me that, given the DUP’s objections to her deal — and the Tory irreconcilables — the only way ahead is to ‘fracture Labour’. There is no guarantee that this plan would work. But there is no guarantee that anything will work right now.

Even if May’s withdrawal agreement did pass, the government would have a problem as the DUP — who remain opposed to it because of its potential effect on Northern Ireland — would then have to consider whether it wanted to continue supporting a pro-backstop government. One cabinet minister lamented to me on Tuesday night, ‘when the DUP was lost, all was lost’.

The defeat of May’s deal has sparked a power struggle. Many in parliament think this government’s time is now up, and it is time for ‘the Commons’ (in other words, an alliance of opposition MPs and Tory rebels) to take charge of the process. They want a series of indicative votes to reveal what the House wants, and then to bind the government to try to negotiate that. Ministers would have to report back regularly on what progress they were making. This would be a day-release government. May would be in office, but not in power.

If the government loses control of the process, then many in Whitehall as well as Westminster would favour an election. To tolerate this situation would leave May as a puppet prime minister acting as go-between for parliament and the EU.

The painful truth is that much of what happens next will be up to the EU. You might think that the Brexit negotiations so far have been embarrassing, even humiliating. But the moment the UK requests an extension, it will become a supplicant: it will have no negotiating leverage. Once a no-deal Brexit is ruled out, the UK will be begging rather than asking; whether to grant an extension, how long to grant it for and what conditions it comes with, will all be up to the EU — and all 27 member states will have to back the decision.

Already, EU leaders are hardening their position. It is not just the French saying that a request for an extension must be accompanied by new thinking, but the Dutch too. The view of Michel Barnier, the EU’s chief negotiator, is that an extension should be granted only if the Commons makes clear what it would vote for.

The extension that the EU offers will be motivated by its own interests. One of its concerns will be to ensure that this country doesn’t upset the EU’s own institutional order. Jean-Claude Juncker has already declared in writing that the UK needs either to have left by 26 May or to take part in the EU Parliament elections.

This suggests that two types of extension will be discussed. One would be short, non-extendable and aim to have everything done by 26 May. Such an extension would only really allow for May’s deal to pass or for the UK to adopt the Norway-plus model, accepting free movement and leaving it as a rule taker right across the economy. Jeremy Corbyn is moving in this direction. He was, I’m told, positive and engaged in a meeting with a cross-party group of MPs on this issue last week. This should alarm Brexiteers. When Corbyn was notionally supporting a second referendum, there was little danger: there aren’t the votes in the Commons for that. But there may well be a majority for a much softer Brexit.

Some in the EU point out that, seeing as no progress has been made in almost three years, it’s far from clear what good another couple of months would do. They prefer the idea of a lengthy extension: the more time Britain has to stew, the more likely they think it is that this country ends up in a tighter relationship with the EU.

I understand, though, that the Prime Minister is adamantly against the UK having to take part in the EU elections — in which the Conservative party would suffer a mighty shellacking. One cabinet minister tells me, ‘She’ll do anything other than extend and have European Parliament elections and the carnage they’d bring.’ Remember, Ukip won the last round of EU elections.

These elections would — with their PR list system — be a perfect launch pad for the Independent Group. It could easily win seats in the more pro-Remain regions of the country and having MEPs would give the TIGers a huge organisational boost.

There is, of course, another reason for May to oppose a long extension. ‘A long delay is a catastrophe for her as there would be time for a move on her,’ points out one cabinet minister. The reason some Tory Brexiteers are relaxed about a long extension is that they think it gives them time to get one of their own into No. 10.

All that is certain at the moment is that nothing is certain — another reason for Brexiteers to be alarmed. The more time there is between 24 June 2016 and the day the UK leaves, the softer Brexit will be, as the pull of the referendum result weakens.

No part of Britain’s political system has come out well from the Brexit process. The government, the civil service and parliament have all made catastrophic mistakes. The question now is whether there is still time to avoid a meltdown of our political system. The answer is: probably. But only if this country avoids being dragged into a humiliating extension and, at this late stage, finds a way to leave the EU in an orderly manner.

The painful truth is that much of what happens next will be up to the EU

Spectator.co.uk/podcast James Forsyth and Peter Foster on what next for Brexit.