Brussels - EU leaders have endorsed a deal on Britain's departure from the European Union, as well as an accompanying political declaration on future relations, in a culmination of arduous divorce negotiations.
"EU27 has endorsed the Withdrawal Agreement and Political Declaration on the future EU-UK relations," European Council President Donald Tusk has wrote on Twitter, referring to the two documents.
Negotiations continued up to the last minute on the texts, which lay out the legal terms for Britain's departure on March 19, 2019, as well as paving the way for negotiations on the future political and trade relationship.
Call to accept the deal
British Prime Minister Theresa May now faces the tough task of selling the deal domestically.
The withdrawal agreement has drawn fierce criticism from eurosceptics as well as pro-EU politicians in Britain, where it looks likely to fail in an initial vote in parliament slated for mid-December.
However, EU leaders have called upon British lawmakers to accept the deal.
Britain's exit from the EU is a moment of "deep sadness," said European Commission President Jean-Claude Juncker. But he expressed confidence that the British parliament will vote in favour of the divorce deal.
Asked for his advice to British lawmakers, Juncker said he would vote in favour, because "this is the best deal possible for Britain."
Juncker said he refused to countenance the possibility of a No vote, adding that a major reworking of the deal is out of the question. "The EU will not change its fundamental position" on Brexit, he said.
EU Brexit negotiator Michel Barnier has described the deal as a "necessary step" to build trust between Britain and the EU in order to negotiate an ambitious future relationship.
Dutch Prime Minister Mark Rutte also has called on the British parliament to ratify the agreement when it is put forward by May.
Rutte said he has "a lot of respect for Theresa May and what she has done ... particularly over the last two or three weeks."
French President Emmanuel Macron, meanwhile, said Brexit demonstrates the bloc's "fragility," and called on leaders to draw the necessary consequences and embark on fundamental reform.
The EU "is always perfectible and should be improved," he said.
While the vote in the British parliament is up in the air, the European Parliament is expected to ratify the agreement, which is also required.
That vote is likely in February or early March, said European Parliament President Antonio Tajani, adding he is "optimistic" about its chances.
Spain and Britain have resolved one other sticking point - the debate over Gibraltar, a British territory on the southern tip of Spain that Madrid also claims sovereignty over.
Opposing backstop provisions
In Britain, however, hardline Brexiteers remain opposed to the so-called backstop provisions of the withdrawal deal, aimed at preventing the re-emergence of a hard border on the island of Ireland after Northern Ireland leaves the EU along with Britain.
The backstop, which would apply only in the absence of a better solution, foresees some divergent regulatory standards for Northern Ireland and Britain, which critics argue would divide the United Kingdom.
It would also place Britain and the EU in a joint customs territory that London would not be able to unilaterally leave.
Despite all these issues, May has said the agreement is the "best possible deal" for her country.