Parliament is now suspended for five weeks, and the outcome of Brexit is as uncertain as ever. The deadlock means we are almost certainly heading for a general election, but the route towards one offers only stark options for both government and opposition – and risks putting severe strain on our constitution.

Parliament has spoken unambiguously on its opposition to a no-deal Brexit by passing a new law mandating an extension. However, Boris Johnson has repeatedly insisted that he will not ask to delay Brexit beyond 31 October. At the same time, he has also said he will adhere to the law. This is an obvious contradiction.

Meanwhile, the opposition parties (which, with the newly independent Conservatives, form a majority in parliament) won’t vote for an election until the Brexit deadline has been extended. So what happens next?

Play Video 2:18 Chaos in the Commons as parliament is suspended to chants of 'shame on you' – video

With parliament prorogued, no election is possible before Halloween. The next few weeks will see a continued hunt for a deal, party conferences and the start of a long campaign until the election proper is triggered.

Whatever doubt exists over how serious the government is about finding a deal, this outcome is still a possibility. But even if the UK and EU could agree a deal, it would still need to pass in parliament – as would the ensuing legislation. Getting such a contentious piece of legislation through its many stages looks like a near-impossible challenge for a prime minister who leads a divided party and has a working majority that has gone from three to minus 43.

The competing narratives from the extraordinary parliamentary battles will be rehashed at the party conferences and throughout an election campaign that will not wait for the formal starting gun. The Conservatives will push their line that parliament is against the people. The Liberal Democrats have come out in favour of revoking article 50. Labour will focus on the incompetence and chaos of the government.

Parliament will return on 14 October. The government’s Queen’s speech will be about electoral positioning, but there’s a good chance that it won’t even pass the Commons. This effectively means that a government has lost confidence, and Johnson might even try to bring about a vote of no confidence in himself – a route set out in the Fixed-term Parliaments Act – to get to an election. But the first votes on the Queen’s speech are due on 21 October, two days after the date when it is required that an extension be sought. And this type of no-confidence vote triggers a 14-day period – during which an alternative government could be formed – that will last well beyond 31 October. Opposition parties will be wary of giving him any mechanism to force no deal.

If no extension had been agreed, then the pressure would be back on the opposition parties. To prevent a no-deal Brexit, they might have to vote no confidence in the government and show the Queen that they have a cross-party majority for an alternative government. A clear majority for an alternative meets Buckingham Palace’s test for appointing a new prime minister.

If opposition parties can agree on an alternative caretaker government – and that is still a big if – then they could oust Johnson, request an extension and trigger an election. Perhaps the current PM would be happy with this outcome if he believes it can help a “don’t let them stop Brexit” campaign narrative. But defeat in a vote of no confidence also means Johnson is out of No 10 and power could be handed to Jeremy Corbyn. If this outcome is unacceptable to the government, then it must return to the question of whether it accepts parliament’s demand to delay Brexit.

The government has said it will test the new law on extension “to its limits”. This suggests that it wants a court case, with the PM perhaps keen to portray the courts, like parliament, as part of the Brexit-blocking establishment. It ought not be conceivable that a government would drop hints about defying the law. Yet that is what has happened.

Boris Johnson loses sixth vote in six days as election bid fails Read more

The official line is that the government will adhere to the law. Finding some way to test that law, or implying that every option has been exhausted, could allow the prime minister to argue that he has tried every means possible to get Brexit through but is being thwarted by this parliament, the opposition parties and the courts. At this point, does he reluctantly extend and then ask the people to elect a parliament that would deliver Brexit? If so, expect the rhetoric on parliament versus the people to heat up even more in the coming weeks.

This October showdown risks placing the constitution under huge strain. For a government to defy the law, and therefore undermine the concept of the rule of law, is unconscionable – and the civil service will have repeatedly warned about the gravity of such a situation.

And if a government refused to relinquish power after losing the confidence of the House, and despite an alternative government waiting in the wings, then the Queen would be dragged into the mess. The palace would strongly urge the government to resign.

The idea of that happening while the government is being challenged in the courts ought to be unfathomable. But nothing seems completely impossible as we approach the Brexit endgame.

• Catherine Haddon is senior fellow at the Institute for Government