Prime Minister Theresa May said she would be returning to Brussels on Saturday to hammer out an outline of Britain's future ties with the European Union after her meeting with the head of the bloc's executive on Wednesday failed to bridge the gaps.
May met European Commission head Jean-Claude Juncker for about an hour and a half to try to win commitments aimed at helping her appease rebels at home opposed to her draft Brexit treaty.
"There were some remaining issues which we have discussed," May said afterwards. "I will be returning on Saturday for further meetings, including again with President Juncker to discuss how we can ensure that we can conclude this process."
With just over four months before Britain's departure, May is trying to finalise an outline of future relations before a summit of EU leaders on Sunday due to endorse the Brexit accord.
Raising the stakes, EU diplomats said they had been told that German Chancellor Angela Merkel was not willing to come on Sunday for any more talks, meaning a text must be ready beforehand.
Spanish Prime Minister Pedro Sanchez meanwhile, insisted he would vote against the draft deal unless he wins assurances over the disputed peninsula of Gibraltar.
On Wednesday night, May spoke to Sanchez and "there had been good engagement between the UK, the Government of Spain and the Government of Gibraltar," May's office said, adding that the UK and Gibraltar "looked forward to these discussions continuing."
May said negotiators from both Britain and the European Union would continue working on the text. "I believe we have been able to give sufficient direction for them to be able to resolve those remaining issues," she said.
A spokesman for the European Commission said "very good progress" was made at May's meeting with Juncker: "Work is continuing."
Diplomats in Brussels said EU states' concerns over fishing rights and future trade ties had largely been addressed in the political declaration on the EU-UK future ties that would form a package with the legally binding divorce deal, meaning Spain's concerns were the final issue to be settled.
"The only thing really outstanding is Gibraltar," said one EU diplomat.
Sanchez has demanded assurances that the future of Gibraltar would be settled through direct talks with Madrid.
"If this is not solved by Sunday, Spain, a pro-European government, will unfortunately have to vote 'No'," Sanchez said at a news conference in Valladolid with his Portuguese counterpart.
Many in Brussels thought Sanchez was trying to score points with voters at home before a December 2 local election in the southern Andalusia region. They said the issue could be solved by the leaders and warned Madrid not to put the whole Brexit agreement at risk.
As an olive branch to Brexit campaigners in Britain, May was seeking to include their proposed technological solutions to keep the border open on the island of Ireland. The EU has previously dismissed these ideas as unrealistic at this stage.
May's finance minister, Philip Hammond, said Britain's parliament needed to back her deal or risk either seriously damaging the economy or jeopardising Brexit altogether.
"A smooth exit from the European Union - doing this in an orderly fashion - is worth tens of billions of pounds to our economy," he told broadcaster ITV.
"If the deal is not approved by parliament, we will have a politically chaotic situation ... In that chaos that would ensue, there may be no Brexit," he added.
The British and European parliaments must ratify the tentative deal to end more than 40 years of partnership before Brexit day on March 29, 2019, or Britain would be set to crash out of the EU with no treaty.
The publication last week of a draft exit treaty sparked the biggest crisis of May's premiership, with two cabinet ministers quitting and dozens of Conservative members of parliament calling on her to step down. They accuse May of making too many concessions to the EU, while others oppose Brexit altogether.
May hopes the blueprint on future relations -- a political document of about 20 pages meant to be agreed side-by-side with the legally binding 600-page exit treaty -- will help win back enough support at home for her approach to pass in parliament.
The Northern Ireland party that props up May's government said it does not plan to withdraw its support yet despite opposition to her withdrawal deal.
"The confidence and supply agreement ... is very much still in existence," Democratic Unionist Party leader Arlene Foster told the BBC broadcaster.
Asked when the party might consider pulling the plug on support for May, Foster said: "We're not there yet."
Despite the political turmoil around her, May has shown no sign in public of any doubt that she can bring home a deal.
The draft treaty envisages Britain staying in a customs union with the bloc, which many Brexit supporters see as a compromise too far.
The EU is trying to discourage Britain from any renegotiation of the draft treaty, while also seeking to assuage concerns expressed by some of the remaining 27 member states. While unanimity among the 27 is not legally required to endorse the deal now, the bloc seeks a unified stance.
Both sides have also been advancing contingency plans for the worst case scenario -- a no-deal Brexit.
Diplomats in Brussels said Britain was also seeking an easy flow of goods after Brexit, a position which was too close to the privileges allowed only for countries that sign up to EU single market rules, including free flow of people and services.
"The UK wants free movement of goods, which they won't get because that's back to discussing partial access to the single market, which we don't do," another diplomat said.
In addition, France has called for more guarantees on future access to Britain's fishing waters, which London wants to keep firmly under its control after Brexit.Most in the EU are determined to get the deal over the line, with a third EU diplomat saying: "There is plenty of negotiating time left to achieve that."