Emmanuel Dunand | AFP | Getty Images

EU leaders backed Theresa May's Brexit withdrawal agreement on Sunday, setting up a showdown with lawmakers in her own country as the U.K. leader nears a crucial vote on her proposals. European leaders gathered in Brussels officially endorsed her plan on how the U.K. will leave the bloc in March of next year. The special summit was largely symbolic and the agreement was widely expected to be approved, despite last-minute concerns from Spain on whether it will have a say on the future of Gibraltar — a disputed British territory that lies on the southern tip of the Mediterranean nation. European Commission President Jean-Claude Juncker reiterated his sadness at the U.K.'s departure, telling reporters in the Belgian capital that it was a "tragedy." But he backed May's plan and said it was the best deal possible for Britain. Other European leaders also spoke favorably of the agreement, with Dutch leader Mark Rutte saying it was balanced on both sides. But the EU's acceptance of the deal has enraged some pro-Brexit politicians in the U.K. who believe that May is making too many concessions to the EU. May faces a tough challenge next month when she needs to gain Parliamentary approval for the deal in Westminster. The vote — likely to be on December 11 — is crucial for May to move forward with Brexit and failure could lead to her being toppled as leader or even the U.K. crashing out of the EU without a deal. On Sunday, she appeared to swerve questions from reporters on whether she would resign if the deal was rejected by Parliament.

Lawmakers in the opposition Labour party, the Liberal Democrats and the Scottish National Party have all indicated that they will vote against the deal. The Northern Irish DUP (Democratic Unionist Party) party, which is propping up May's government in Parliament, also said it would vote against it, with its deputy leader saying Saturday it would leave Britain in a "pitiful and pathetic place." Even pro-Brexit and pro-Remain lawmakers within May's own Conservative Party have said they will vote against her, meaning approval is anything but assured. But May has resolutely defended her plan at every stage. She has called on business leaders and U.K. citizens to back her, even if many politicians will not. On Sunday, May wrote a letter to the British public pleading for support, promising a "brighter future" for the U.K. "It will be a deal that is in our national interest — one that works for our whole country and all of our people, whether you voted 'Leave' or 'Remain'," she said in the letter. "It will honor the result of the referendum."

What's been approved?

The endorsement from the 27 EU leaders follows more than 18 months of negotiations between the two sides. Talks began when the U.K. triggered Article 50 in the wake of the 2016 referendum vote and the country is due to leave the EU on March 29, 2019. There was no formal vote at the fairly short Brexit summit on Sunday morning. But the leaders approved May's withdrawal agreement, which is a 585-page, legally-binding document setting out the terms of the U.K.'s exit. It does not address any future relationship between the U.K. and the EU but rather issues such as citizens' rights, a £39 billion ($50 billion) "divorce bill" and a backup plan for the Irish border if upcoming trade talks stall. Also on Sunday, the 27 EU leaders agreed on a separate political declaration which loosely outlines future issues such as U.K.-EU trade and security.

Parliament will decide

May needs a simple majority of the 650 lawmakers that sit in the House of Commons. Her 315 Conservative MPs (Members of Parliament) do represent the largest party in the House, but a significant number are against the plan. The Conservatives operate a majority in the Commons by working in tandem with 10 votes from the DUP. The left-of-center opposition Labour Party has 257 lawmakers and would appear to hold the whip-hand. Labour has indicated they will ask their MPs to vote against May's deal, but there are a number of rebels that May can count on. It's estimated she would need around 40 Labour MPs to cross the divide and vote for her. Despite deep divisions within Labour, political analysts see that as a high threshold. The third-biggest party, the Scottish National Party (SNP), has promised that all 35 of its MPs will reject the deal, calling it an unfair solution for Scotland. Nonetheless, there is some optimism from certain market watchers, including analysts at Nomura. In a detailed research note last week, strategists at the Japanese bank said the alternatives to voting down the deal make it more likely that enough MPs would rather get Brexit done, as opposed to risking a no-deal or no Brexit at all. Their "base case" is for a deal to be voted through, which they assign with a 60 percent probability.

"Whatever way the MPs are split, if the deal is approved the vote will still be a close call. The market could be convinced of having more success if the 50 or so Brexit ultras back the deal. It could help convince other Brexit-backing groups from Labour to get the deal over the line," the Nomura analysts said. Carsten Nickel, the deputy director of research at consultancy Teneo Intelligence, had a similar view. "A second referendum and early elections remain unlikely. Eventual sign-off should therefore be the base case, but this might not be achieved in the first attempt," he said in a note on Sunday.

Market reaction