What you need to know:
- At a special summit in Brussels that was almost derailed by a row over Gibraltar, the other 27 leaders will gather to sign off the agreement before Ms May joins them to mark the milestone.
- But it is not the final stage, as the House of Commons in London must still approve the deal before Brexit day on March 29, 2019 -- and many MPs have warned they will not back it.
- Britain remains deeply divided over the decision, but the prime minister said that finally leaving could be "a moment of renewal and reconciliation".
European Union leaders meet Sunday to approve a historic Brexit deal, which British Prime Minister Theresa May said would deliver her country a "brighter future".
At a special summit in Brussels that was almost derailed by a row over Gibraltar, the other 27 leaders will gather to sign off the agreement before Ms May joins them to mark the milestone.
Forged during 17 months of tough negotiations, the deal covers financial matters, citizens' rights, Northern Ireland and a transition phase, and sets out hopes for future security and trade ties.
But it is not the final stage, as the House of Commons in London must still approve the deal before Brexit day on March 29, 2019 -- and many MPs have warned they will not back it.
Until the agreement is approved, all sides are still planning for the potentially disastrous possibility that Britain ends its four-decade EU membership with no new arrangements in place.
EU Council President Donald Tusk, who has always said he would prefer Britain not to leave, said on the eve of the summit that "no-one will have reasons to be happy" when Brexit happens.
But he said terms had been agreed that would "reduce the risks and losses", and recommended that EU leaders sign off on the deal.
Eurosceptics in Ms May's Conservative party and their Northern Irish allies warn they will not support the agreement when MPs vote as expected next month.
But in an open "letter to the nation" on Sunday, the prime minister said it delivered on the 2016 referendum vote to leave, and was a "deal for a brighter future".
Britain remains deeply divided over the decision, but the prime minister said that finally leaving could be "a moment of renewal and reconciliation".
"To do that we need to get on with Brexit now by getting behind this deal," she said.
Ms May arrived on the eve of the summit for final talks with Tusk and European Commission President Jean-Claude Juncker, after which Tusk's spokesman tweeted: "We are on track for tomorrow."
But nothing in the negotiations has gone smoothly and the summit risked being derailed by a late objection to the deal by Spain over the British territory of Gibraltar.
Prime Minister Pedro Sanchez threatened to reject it unless his country kept a veto over future changes to EU ties with "The Rock", which borders Spain and which it has long claimed.
The impasse was resolved when Britain promised to continue bilateral talks with Madrid after Brexit -- although that itself caused further tensions.
Mr Sanchez claimed that discussions would cover the "co-sovereignty" of Gibraltar, something residents overwhelmingly rejected in a 2002 referendum.
Ms May was quick to correct her Spanish counterpart, saying: "The UK's position on the sovereignty of Gibraltar has not changed and will not change."
In legal terms, Spain's disapproval would not have halted the divorce settlement.
But it would have been an embarrassing split for EU leaders who have proved remarkably united in the painful negotiation.
British MPs are most concerned about an arrangement in the withdrawal agreement to keep open the border between British Northern Ireland and Ireland, which could see the province follow EU rules for years.
But there are also concerns in EU capitals about fishing rights and commercial rules Britain must follow to maintain access to the bloc's markets.
A diplomatic source said the minutes of Sunday's summit meeting of the 27 leaders would record those concerns, although it was not clear if they would be made public.