The British Parliament has rejected the Brexit deal for a third time, intensifying the UK’s political chaos just two weeks before the country breaks up with the European Union.

Members of Parliament (MPs) defeated the deal, 286 to 344 — a much closer margin than the previous two votes in March and January, but still short of a majority. It has dealt another deep blow to the already flailing authority of Prime Minister Theresa May.

The UK is now slated to break up with the European Union on April 12 without a deal, unless it can come up with a new strategy before that date, potentially leading to a much, much longer Brexit extension.

May tried a new tactic to get her deal through Parliament this time: offering to resign if MPs backed her plan. The bargain won the support of dozens of hardline pro-Brexit MPs in her party who had rejected her deal twice in the past. But it did not persuade May’s allies in Northern Ireland, the Democratic Unionist Party (DUP), who have staunchly opposed the deal, which ultimately doomed it.

Parliament may have one more chance to take control of the Brexit process on Monday, when it’s expected to debate and vote on various Brexit options yet again. Parliament voted Wednesday on eight different strategies, with none winning outright. MPs are expected to take the most popular plans — including a customs union with the EU — and see if they can settle on a new approach in the second round.

The UK was originally scheduled to leave the EU Friday. The political impasse has pushed the Brexit process to the brink once again this week, with the UK running out of alternatives and time.

Theresa May’s political miscalculation

The EU agreed last week to extend the Brexit deadline until April 12, unless the UK could pass the Brexit deal this week. If it could, the EU would delay Brexit until May 22, to give the UK time to pass the necessary domestic legislation, and for the EU Parliament to ratify it.

But May faced two problems: continuing resistance from MPs, especially the hardliners in her Conservative Party; and Speaker of the House of Commons John Bercow, who ruled that May could not bring her Brexit deal back for a third vote unless it was substantially changed.

May’s government responded by splitting apart the Brexit deal and putting on a vote for just the nearly-600 page withdrawal agreement, which is basically the divorce settlement in the EU-UK breakup.

It lays out a transition period after the UK officially leaves the EU, how much the UK must pay the EU when it leaves, and the so-called “Irish backstop” that prevents a hard border between Northern Ireland (part of the UK) and the Republic of Ireland (an EU member state) after Brexit.

Left out — unlike in previous votes — was the short political declaration, which is an agreement between the EU and the UK that says that, post-Brexit, the two will negotiate a future relationship. Parliament would have still needed to vote on this political declaration at another time.

This strategy was intended to get around Bercow’s ruling, which it did. It also would have secured that May 22 Brexit deadline, and make a prolonged Brexit delay much less likely. A longer extension would require the UK to host European parliamentary elections, which start May 23.

Many MPs who represent pro-Leave constituencies are wary about locking the UK into the EU for many, many months — but, with some notable exceptions, they also don’t want to leave the EU without an agreement in place.

The prime minister told Conservative MPs on Wednesday that she would resign after her deal passed and let the next prime minister negotiate the future EU-UK relationship, as called for in the political declaration.

The bargain won the support of dozens of hardline pro-Brexit MPs in her party who had vociferously refused to back her deal in the past. It turned out they disliked May more than they disliked her deal.

But it was not quite enough. May couldn’t convince the Democratic Unionist Party (DUP) to overcome its objections to the withdrawal agreement. The DUP is a conservative party from Northern Ireland, and its members’ 10 votes prop up May’s Conservative majority. They have steadfastly objected to the “Irish backstop”; the DUP sees it as a constitutional threat because it keeps Northern Ireland more closely aligned with the EU compared to the rest of the UK.

May may also have calculated that she could win over some support from the opposition Labour Party by splitting apart the withdrawal agreement and political declaration. Labour Party leaders have less of an issue with the withdrawal agreement, and have mostly objected to the political declaration because they think it doesn’t offer a clear framework for future negotiations. Labour leaders do want a political declaration, but they want it to include certain commitments. (Labour has its own Brexit plan.)

But here’s where May’s other promise, to resign, probably made things even worse. Labour members would like to see May go, but they want general elections, which aren’t guaranteed if she resigns.

Instead, the Conservative Party would pick a new leader, and the winner of that contest is likely to emerge from the pro-Brexit camp. Which means someone other than May could be working out the future EU-UK relationship, and that future prime minister would almost certainly take a hard line with the EU and try to put as much distance as possible between Brussels and London.

The political declaration, because it’s vague by design, would make this feasible. That doesn’t appeal to Labour, or probably even moderates or Remain-minded Conservatives because it confirms exactly what they feared — unless they get some guarantee of a close relationship with the EU, it won’t materialize.

May’s concession to hardliners to resign made the Brexit deal digestible to many of them — because it would put them in power. Not everyone was persuaded. And, with the specter of Boris Johnson leading the country, Labour members could never back the withdrawal agreement.

So the vote was doomed from the start.

The Brexit deadline is April 12 — unless the UK makes a decision

The UK Parliament is expected to debate a few options on Monday for a different Brexit strategy. The terms of the vote haven’t been set yet, but it will likely include the finalists from Wednesday’s vote that did not win a majority of support, but came close.

The customs union (defeated by eight votes) and a public referendum (defeated by 27 votes) are among the options that might win over last-minute parliamentary support now that the withdrawal agreement has been defeated again.

If Parliament can agree on a new solution, it will be up to May and her government to decide whether to follow it — if May is still prime minister. May has said she wants to deliver Brexit for the country but has failed so far, and she may step aside anyway amid a third embarrassing defeat. May could also put forward a motion for general elections, leaving it up to the people to break the Brexit impasse by electing new leaders.

The other wildcard in all this is the EU. It has said the UK must pass the deal this week to get the May 22 extension. It’s not clear if the EU will be flexible and still grant such a delay if May tries a fourth time to pass her deal before April 12. If the EU won’t go for that, the UK will have to approve a long Brexit extension if it wants to avoid a no-deal Brexit. But the UK will almost certainly need to tell the EU what it will do with all that extra time.

If the UK can’t agree on an alternative plan, that leaves one option: a no-deal Brexit, in which the UK crashes out of the EU without a deal on April 12. This is the catastrophic outcome: for the economy, for politics, and for the British people. It is the only option Parliament agrees it wants to avoid. But it might be the only one it can’t stop.