(CNN) -- All 27 remaining European Union leaders signed off Britain's Brexit deal with mixed emotions at a special summit on Sunday -- but the real test is yet to come.
While EU leaders mourned a "sad day" in the bloc's decades-long history, UK Prime Minister Theresa May disagreed, saying "I am full of optimism."
Less than an hour after members gathered in Brussels, European Council President Donald Tusk tweeted that they had endorsed the "Withdrawal Agreement and Political Declaration on the future EU-UK relations."
The agreement is a small victory for May, who must now persuade lawmakers in the UK Parliament to vote for her deal.
Given that opposition parties -- not to mention many lawmakers within May's Conservative party and the Northern Irish DUP, which supports her minority government -- have indicated they'll vote against it, the deal is far from sealed.
Shortly after European leaders endorsed the deal, DUP leader Arlene Foster reiterated that her party "will not be able to support" it, during an interview on the BBC's Andrew Marr Show.
If UK lawmakers do approve the deal, which looks highly doubtful, it will then go to the European Parliament.
But if Westminster stops the deal in its tracks, then Brexit could go a number of ways -- including exiting the bloc without a deal at all, or, just possibly, a second referendum that could scrap Brexit altogether.
It would also cast serious doubt on May's future as prime minister, already under intense scrutiny from Brexiteers within her own party unhappy with what they say is a "soft" exit from European regulations.
When asked by reporters Sunday if she would consider stepping down if the deal flounders in Parliament, May said "this is not about me."
"My focus for the next few weeks is making this deal possible," she said, adding, "if people think there's another negotiation to be done, that's not the case."
Juncker also urged the UK Parliament to vote for the deal, set to happen before Christmas. Pointing his finger in the air for emphasis during a news conference, Juncker addressed lawmakers back in London: "This is the best thing possible for Britain, the best thing possible for Europe...this is the only deal possible."
Meanwhile former UK Prime Minister and pro-EU campaigner Tony Blair had a different take, telling the BBC Andrew Marr Show that a second referendum was "the only way you are going to unite the country."
EU leaders mourn 'sad day'
The mood among EU leaders gathering in Brussels was bleak, with European Commission President Jean-Claude Juncker telling reporters that it was a "sad day."
"To see a country like Great Britain... leave the EU is not a moment of joy nor of celebration, it's a sad moment and it's a tragedy," he said.
Speaking of the "shared sadness" felt by members, he added this was not a moment of "raising champagne glasses."
German Chancellor Angela Merkel struck a similarly sombre tone, telling reporters it was "tragic" that Britain was exiting the EU but "good" the two sides had reached an agreement.
"I feel sad.. but also a sense of relief that we were able to achieve what we have," she said.
Meanwhile French President Emmanuel Macron said Brexit had proved that "our European Union has a certain fragility" and that "it can always be improved."
When asked by reporters if May shared this sadness, she said, "No. But I recognize that some European leaders are sad and some people back at home will be as well."
Prime Minister May, perhaps unsurprisingly, was more optimistic in a letter to the British public on Saturday evening.
"It is a deal for a brighter future," she wrote. Britain is set to exit the EU on March 29 next year, and May said it will be a "moment of renewal and reconciliation for our whole country."
Spain had threatened to derail the Brussels summit after last-minute disagreements over Gibraltar -- a British territory on the Iberian Peninsula -- but these were resolved in negotiationsSaturday.
™ & © 2018 Cable News Network, Inc., a Time Warner Company. All rights reserved