LONDON — Boris Johnson is seemingly out of options.

The British prime minister desperately wants a new election to break loose the Gordian knot that is Brexit. His opponents rejected that motion for a second time in a vote just after midnight Tuesday morning.

At the same time, he has said he would “rather be dead in a ditch” than seek an extension to the Oct. 31 deadline for leaving the European Union. But that is exactly what legislation passed by Parliament last week requires him to do if he cannot cut a deal with E.U. headquarters in Brussels by Oct. 19. 

And those negotiations? His ministers say they’re barely even happening

So where does the prime minister go from here?

He probably will have to do something he has previously ruled out or break through a law or convention that would thrust Britain into a profound constitutional crisis. Some among his hard-line Brexit allies are even urging him to become “a martyr” to the cause and go to jail. Although that is highly unlikely, many of the major events in British politics in recent days were, not long ago, considered virtually impossible.

Here are the main possibilities for where Boris and Brexit go next.

Johnson could renegotiate a deal with the E.U.

British Prime Minister Boris Johnson held a news conference with Irish Prime Minister Leo Varadkar on Sept. 9, following talks in Dublin. (Reuters)

Perhaps the most straightforward solution to the crisis is the one that has bedeviled Britain for nearly three years: to negotiate a withdrawal deal with the E.U. that better resembles the lofty vision outlined by Johnson and his Brexiteer allies during the 2016 referendum campaign.

Hard-line Brexit advocates, including the prime minister, disparaged the agreement that his predecessor, Theresa May, hammered out during her Downing Street tenure, and it was defeated in Parliament three times. Johnson promised to bring back a better deal, using the threat of a no-deal departure as leverage.

But the E.U. has refused to blink, and top European officials have said they have seen no sign of any substantive negotiation.

Neither have members of Johnson’s cabinet: Amber Rudd, a senior minister who resigned Saturday night in protest over the purge of 21 fellow moderate Conservatives, told the BBC on Sunday that she had “no idea” what the British government was seeking from Europe and that there was little effort in the government to loosen the logjam.

Johnson was in Dublin on Monday meeting his Irish counterpart, Leo Varadkar, to try to make headway on one of the thorniest Brexit questions: how to prevent a hard border between the Republic of Ireland, an E.U. member, and Northern Ireland, which is part of the United Kingdom. But Varadkar said at a news conference that Johnson had yet to give him any solid proposals. Both leaders agreed the two sides remain far apart.

Johnson could ask for a Brexit delay

Humiliating defeats in Parliament last week mean Johnson will not be legally allowed to take Britain over the cliff edge of a no-deal exit on Oct. 31. Instead, he will need to ask for yet another delay from the E.U. He has said he won’t, having campaigned for his job on a pledge that Britain would exit the E.U. by Halloween, “do or die.”

He reiterated that promise last week, telling Conservative Party members in a letter on Friday that Parliament had “passed a law that would force me to beg Brussels for an extension to the Brexit deadline. This is something I will never do.”

But Johnson is not exactly known for keeping his word. He could, conceivably, ask the E.U. for the delay, then launch an election campaign railing against the opponents who forced him to do it. But pro-Brexit voters, who have overlooked many a Johnson foible, might not forgive him for that one. 

It is more likely that he could go through the formal motions of asking for a delay with the hope that E.U. leaders would not grant it. Such an extension would require the unanimous agreement of the 27 other E.U. members.

There are signs that patience with Britain’s political circus is running out. French Foreign Minister Jean-Yves Le Drian threatened Sunday to veto an extension, citing a “worrying” lack of progress.

Brexiteers are fond of floating the idea that Hungarian Prime Minister Viktor Orban, who has little love for Brussels and much in common with anti-E.U. populists such as Johnson, could also lend a hand. But that’s probably more fantasy than reality.

E.U. diplomats say an extension would likely be approved in the end.

Johnson could resign

It sounds crazy. But Johnson’s surest path to shoring up his job might be to quit it. The logic goes like this: Labour and the other opposition parties refuse to give Johnson the election he wants, decrying it as “a trap” that would give the prime minister a back door to no deal. 

But Johnson could voluntarily stand down or introduce a no-confidence motion against his own government. A caretaker would have to take over, be it Labour Party leader Jeremy Corbyn or a more neutral figure, such as recently purged Conservative grandee Kenneth Clarke. That government would, presumably, ask the E.U. for a Brexit extension.

There would then have to be a new election. Johnson could campaign on the argument that Parliament had, once again, blocked the will of the people and kept Britain in the E.U.

With polls showing the Conservatives well ahead of Labour, and with Brexit Party leader Nigel Farage dangling the possibility of a pact with the Conservatives, a new vote could deliver Johnson the no-deal majority he needs to take Britain over the cliff — if not by Oct. 31, then by whatever the next deadline may be.

Johnson could go to jail

It sounds even crazier. But the idea of the prime minister ending up behind bars is getting serious attention in London.

Foreign Minister Dominic Raab has said the government plans to “test to the limit” of the law that requires Johnson to seek an extension from the E.U. Unnamed senior aides, meanwhile, have told the Sunday Times that the government plans to “sabotage” the law and “take a chainsaw to anything” standing in the way of an E.U. departure. 

Former Conservative attorney general Dominic Grieve wrote in the Sunday Observer that noncompliance with the law would mean that the prime minister “would be in contempt of court and could be sent to prison.”

Some Brexit advocates seem to relish the thought. Former Conservative leader Iain Duncan Smith has urged Johnson to break the law and become “a martyr” for the Brexit cause.

Even if Johnson did not go to jail, ignoring the law could be a way for him to run out the clock: He isn’t required to ask for the extension until less than two weeks before the withdrawal deadline, meaning that any case against him could still be tied up in the courts when Britain slips out of the E.U.

The likelihood is that threatening to ignore the law ends up being a bluff, one that will play well among pro-Brexit voters. But these are strange times in British politics, with some veteran observers entertaining dark thoughts about where it is all headed. As senior journalist and historian Andrew Marr said Sunday on his BBC interview program, “Our political system, our constitution, is beginning to break down.”