European Union negotiators meet on Friday to try to clear the last hurdle before a Sunday summit is due to endorse the Brexit deal, but Spain's eleventh-hour objections over Gibraltar mean the final text could not be ready until the last minute.
Four months before Britain leaves the EU, the legal divorce treaty and an accompanying political declaration on the two sides' future ties are ready to be rubber-stamped by British Prime Minister Theresa May and the leaders of the 27 union states staying on together after Brexit.
Spain has asked for changes to the withdrawal treaty and the declaration on a new EU-UK relationship to make clear any decisions about the disputed British overseas territory of Gibraltar would only be taken in direct talks with Madrid.
Spanish Prime Minister Pedro Sanchez said on Thursday that Spain will veto the draft deal on Britain's exit from the European Union, if there are no changes made.
"After my conversation with Theresa May, our positions remain far away. My government will always defend the interests of Spain. If there are no changes, we will veto Brexit", Sanchez said in a tweet.
Under EU rules, the withdrawal treaty is adopted by qualified majority and not unanimity, so a single state cannot block it. EU leaders, however, seek unity on this most politically sensitive matter.
The Brexit package faces vehement opposition in the British parliament, which must vote in favor for it to take effect. Otherwise Britain risks crashing out of the bloc on March 29, 2019, without an agreement to mitigate economic disruptions.
Determined not to allow any redrafting of either of the two texts and risk derailing the fragile process, EU states have instead proposed to address Spain's concerns in a separate statement by the 27 leaders on Sunday that would not be part of negotiations with Britain.
The national leaders' EU negotiators — or 'sherpas' — meet at 9 a.m. GMT on Friday in Brussels and May will then come for talks with the head of the bloc's executive, Jean-Claude Juncker, on Saturday evening, just hours before the summit.
EU diplomats hope a text could be agreed by Friday evening but they also fear Sanchez would want to make a case of discussing it at the top level on Sunday to show determination and win points with voters at home ahead of a December regional election.
The Brexit deal covers financial settlement, expatriates' rights and the sensitive Irish border, as well as setting a blueprint for future trade and security ties. It must also be backed by the European Parliament to come into force next year.