LONDON — When British Prime Minister Theresa May sits down for dinner with 27 other European leaders on Wednesday, she will need a strong stomach as Brexit turmoil yet again threatens to topple her government.

It will be her last major summit before the U.K. leaves the European Union in less than six months, but unless squabbling British lawmakers unite behind her post-Brexit plan — a consensus that appears unlikely — it could also be May's last summit as prime minister.

Boris Johnson, Britain's former foreign secretary, quit in July in protest at Theresa May's so-called Chequers deal. Paul Ellis / AFP - Getty Images

“We are at that stage in the process where it comes harder and harder to paper over the cracks,” said Tim Haughton, associate professor in European politics at the University of Birmingham. “We are now getting close to the endgame and the point at which decisions have to be made.”

Brexit negotiations have often been compared to playing a multi-level game of chess. May’s plans need to please not only the lawmakers in her own fragile governing coalition but also the 27 other countries in the E.U. It is a balancing act that even the most skilled negotiators would find challenging.

The E.U.’s chief Brexit negotiator, Michel Barnier, said last week that a deal "is within reach," with 80 to 85 percent of it already negotiated and the most difficult discussions left to the end. Negotiations this weekend seemed to have made little progress, with both Barnier and the British government tweeting Sunday evening that there remained a number of unresolved issues.

At the heart of the current disagreement is the state of the post-Brexit border between Ireland — an E.U. member — and Northern Ireland, one of the four nations that make up the U.K. The border has been the focus of deadly violence in the past, and, after March 29, the Brexit deadline, it will be the only land border between the E.U. and Britain.

Both sides agree there should be no customs checks or other infrastructure on the border, but there is no agreement on how and where those checks should take place.

Under May's proposals, in the event Britain and the E.U. don’t come to a trade deal, the whole of the United Kingdom would be in a customs partnership with the E.U. after a transition period ends in December 2020.

Some of May's ministers have urged her to put a time limit on that partnership, something the E.U. opposes.

Time is running out to seal some kind of deal in Britain's divorce from Europe, its biggest trade and foreign policy shift in more than 40 years. If Britain is to reach a settlement by March 29, May and the Europeans must find solutions in the coming weeks so that national parliaments across the continent have enough time to ratify the agreement.

As that departure date creeps closer, those wanting to influence May's approach are stepping up their efforts.

Her former foreign secretary, Boris Johnson, who quit in July in protest at her so-called Chequers deal, has stepped up his opposition in recent days.

"Under the proposals now being put forward by the U.K. government — the Chequers plan — the whole of the U.K. would effectively remain in the customs union and single market. This is a catastrophe for Brexit, and makes a mockery of the project," he wrote in The Telegraph newspaper on Monday.

It's a sentiment echoed by Owen Paterson, a fellow Conservative member of Parliament and former Northern Ireland secretary, who wrote in a piece in the same paper that May would be “most unwise” to put her current proposal up for a parliamentary vote.

Her plans also face opposition from pro-Europe members of her party, some of whom are now pushing for a final referendum on the terms of May’s negotiation.

The uncomfortable truth is that #Brexit cannot be delivered. It’s time we all faced the reality and were honest with the British people. We owe them a huge apology for a referendum with an option that was undefined & undeliverable. https://t.co/ejimmtPLNV — Anna Soubry MP (@Anna_Soubry) October 14, 2018

Any deal May makes with Brussels will be subject to a vote in Parliament. And with so many differing visions of what Brexit should look like, May will need expert powers of persuasion. Otherwise, she could lose the vote and the U.K. would leave the bloc with no deal.

With strife rife in her own party, the prime minister will likely be forced to rely on votes from legislators in other parties. It's unclear whether the rival Labour Party's leadership can convince enough individual members to stomach voting against May and for a no-deal Brexit that could hit their own constituents hard.

The cost of Britain turning its back on its closest trading partner without a deal would be high. The International Monetary Fund has warned of “dire consequences” if Britain leaves the E.U. without a deal, including the possibility of a recession and a sharp devaluation of the British currency.

Yet for all the bluster of May’s opponents at home, analysts suggest that there would be a widespread reluctance to bring May down and chance a general election that could easily bring the Labour Party to power.

“The one thing to keep in mind is that this is a negotiation process and anyone who knows anything about negotiations will tell you it’s all about signaling — signaling to your own side, to your interlocutors, and to your opposition,” Houghton said.

Among Europeans, there continues to be a disbelief that the U.K. is in this situation at all, said Simon Usherwood, deputy director of the think tank U.K. in a Changing Europe, and politics researcher at the University of Surrey.

"At the moment there’s a lot of sitting around waiting for the U.K. to decide what it wants,” he said. “There’s frustration that once the U.K. started the exit process, it doesn’t seem to be able to finish it off.”