UK Prime Minister Theresa May has clinched a Brexit deal with the European Union (EU) after months of deadlock. She now has to convince a sceptical cabinet that it’s not a sellout and overcome near impossible odds to get it through Parliament. Negotiators have settled on a divorce text and May’s ministers were invited into her office on Tuesday to read it. On Wednesday, they will be asked to sign off on the deal at a 2pm meeting—though there’s a risk some will resign instead.

Before they had even seen the document, politicians on all sides of the Brexit debate were condemning it as a betrayal of the 2016 referendum result. And in a serious blow to May, the Northern Irish party that props up her government branded it unacceptable.

The pound rose on the breakthrough as talks have been stalled for months. But it won’t be a done deal until it clears Parliament.

May has won a concession from the EU over the thorniest issue of all—how to prevent a border emerging in Ireland as a result of Brexit. But the win comes with expensive conditions attached: the whole UK is set to remain in the EU’s customs and trade orbit indefinitely, unless a better idea turns up in the next two years.

While business would welcome the arrangement, it’s a breach of May’s promises. It’s also unacceptable to many pro-Brexit Tories who want to break free from the EU’s clutches and strike new trade deals around the world. Pro-EU Conservatives have also become more skeptical in recent weeks as they see the UK handing over sovereignty rather than taking it back.

Jacob Rees-Mogg, a leading Brexit-backer, said the Brexit deal took the UK from being “a vassal to a slave".

Still, May’s most important pro-Brexit ministers are standing by her, The Sun reported. That includes Brexit secretary Dominic Raab and environment secretary Michael Gove, heavyweights whose resignation would prompt pose a serious threat to the Brexit deal.

May has already survived the loss of some of key figures in her Cabinet including former Brexit secretary David Davis and foreign secretary Boris Johnson. She has defied the rules of British politics since almost losing a general election last year, and has staggered on against the odds, even amid criticism from her Cabinet. She could probably keep going if a minor figure walked out.

But for every minister who walks out, her vote count in Parliament looks trickier. Even if they all stay, getting it through Parliament remains a struggle.

Representatives of EU governments are expecting to be briefed on Wednesday on the deal—which includes the draft separation agreement and also an outline of what the future relationship should be. That part isn’t binding and is expected to include more warm words than detailed decisions. They will meet at the same time as the cabinet.

If all goes well, and it still might not, then a summit could be called toward the end of November—officials said 25 November was a likely date. EU officials warned on Tuesday that it’s not done until it gets political sign-off in London.

May is keen to get the deal done in November to avoid having to ramp up spending on no-deal planning. Business is desperate for the terms to be nailed down so that they can start banking on the two-year transition period that’s included in the divorce agreement.

Even before the details were known, politicians in London were voicing their opposition to what they think the deal will say. The Northern Irish party that props up May’s government said it probably couldn’t vote for the deal. Pro-Brexit lawmakers said the same.

But in some good news for May, Iain Duncan Smith, an influential Brexiteer, reckoned that Cabinet ministers would back her, if only out of spinelessness. He told reporters: as Margaret Thatcher “once said to a friend of mine, but it may apply to the cabinet: ‘your spine does not yet meet your brain.’"

Julian Smith, May’s chief whip, also sounded upbeat: “I am confident we will get this through Parliament." The government is betting that the reality of having a deal in hand—and the prospect that rejecting it would bring chaos—will convince Tories to fall in line. The math doesn’t support their optimism.