Just one day ago, it looked like Britain might finally have a deal for exiting the European Union. Now, it looks just as likely Britain could end up with a new prime minister before this latest round of Brexit chaos subsides.

What’s happened so far:

On Wednesday, Prime Minister Theresa May presented a draft agreement to her Cabinet, establishing the terms for Britain’s withdrawal, which is due to take place on March 29. After a contentious five-hour meeting, the Cabinet reluctantly approved the agreement, which still must be approved by Parliament. But today, two Cabinet ministers resigned over the agreement, including Brexit Secretary Dominic Raab and several junior ministers. Current Environment Minister Michael Gove, the most prominent pro-Brexit voice remaining in the Cabinet, is thought to be in line to take Raab’s job, but according to the BBC, he will take it only if he can renegotiate the deal.

Pro-Brexit members of May’s Conservative Party as well as the opposition parties have been trashing the deal in Parliament today. Hard-line Brexiteer Jacob Rees-Mogg has called for a vote of no confidence in May, as have up to a dozen other Tories. If 48 Conservative members of Parliament submit letters, it will trigger a vote.

May can then either fall on her sword and resign, or try to win the vote. Even if she survives, the breadth and vehemence of the opposition to her deal from both sides of the aisle today suggests she will have a tough fight getting it approved in Parliament, where her coalition has only a very narrow majority.

What’s the problem with the agreement?

The 585-page document, the product of months of negotiations with EU leaders, resolves a number of key issues, including Britain’s financial obligations to the EU and the rights of EU citizens currently living in Britain and British citizens currently living elsewhere in Europe. A final trade agreement between Britain and the bloc would be negotiated during a 21-month transition period.

The most contentious issue in negotiations—surprisingly, given that it was barely discussed in the lead-up to the Brexit referendum in 2016—is the status of Northern Ireland. This is the only part of the United Kingdom that has a land border with the EU, meaning that goods crossing it would somehow need to be checked for EU standards and tariffs. Neither side wants to impose a hard border with customs checks, which, it is feared, could imperil the region’s hard-won peace. The EU has insisted on what’s been called a “backstop,” an agreement that will keep Northern Ireland in a single market for goods and customs union with the rest of Europe if the two sides can’t resolve the issue by 2020. Since this would essentially involve creating an economic border between Northern Ireland and the rest of the U.K., it is anathema to British conservatives—and even more so to the Democratic Unionist Party, the right-wing Northern Irish party that May has depended on for her parliamentary majority since calling an ill-advised general election last year.

All this has created what’s been called the “trilemma.” Britain wants to leave the EU’s single market, avoid a hard border in Ireland, and keep the country economically united. “You can have two of those things, but you can’t have three of those things,” Amanda Sloat, a senior fellow at the Brookings Institution’s Center on the United States and Europe, told me.

May’s agreement includes the backstop, and also keeps Britain as a whole within the EU customs union during the transition period, meaning Britain would not be able to negotiate trade agreements separately from the EU.

This is only supposed to be a temporary measure, but Brexiteers fear it could lock Britain into the customs union indefinitely. The deal also appears to give the EU veto power over whether Britain can leave the backstop. Sensing blood in the water, Britain’s opposition parties aren’t any more supportive of the deal, with Labour leader Jeremy Corbyn calling it a “leap in the dark—an ill-defined deal by a never-defined date.”

So what happens now?

Even if May survives today’s leadership challenge and then defies the odds by getting her agreement approved by Parliament, the Irish trilemma isn’t going away, and no one seems to have a good idea of how to solve it. There are hopes that technological solutions could be put in place to track goods crossing the border without customs posts, but currently this tech, as one official recently put it, “is either untested or does not exist.” But at the very least, the backstop would buy May’s government some more time to figure out a solution.

If May is forced to resign by her own party now—or if Parliament rejects her deal, which could lead to her resignation and new general elections—then it’s anybody’s guess what happens next. There’s little time left to negotiate a new deal with Brussels, and EU leaders have indicated they have little interest in going back to the table. An emergency session of the 27 EU member states is likely to be held later this month to sign off on the current deal.

The prospect of an economically disastrous “no deal” Brexit is growing steadily. Speaking to Parliament last night, May gave a glimmer of hope to those hoping Brexit might still be avoided altogether, saying, “We can choose to leave with no deal, we can risk no Brexit at all, or we can choose to unite and support the best deal that can be negotiated,” May told the House of Commons (emphasis mine). Polls suggest voters might now favor a new referendum, though Corbyn has been skeptical of the idea.

Whatever happens, the debate will only rage on. Ironically, those who backed Brexit in hopes of removing the EU from British politics have ensured that their leaders will spend the next few years talking about little else.