Theresa May will return to Brussels for Brexit talks this weekend as the UK and EU strive to do a deal in time for Sunday's summit of European leaders. After a two-hour meeting with EU officials, the prime minister said progress was being made on the future shape of EU-UK relations.
Spain has said it will not agree to the Brexit deal unless changes are made to the wording over Gibraltar. But No 10 sources said they expected a solution before Sunday's gathering.
Sources said the announcement that the PM would make an unscheduled trip to Brussels on Saturday did not signal major problems over a document setting out the UK's future relations with the EU.
Mrs. May spoke to Spanish Prime Minister Pedro Sánchez on Wednesday evening and said discussions would continue following good engagement between the countries and the government of Gibraltar, according to a Downing Street spokesperson.
London and Brussels have already agreed the draft terms of the UK's exit from the EU on 29 March 2019 - a 585-page document covering citizens' rights, financial issues and the Irish border.
While some Tory MPs want what BBC political editor Laura Kuenssberg described as nips and tucks to this legally-binding agreement, the UK and EU have signaled there will be no major changes.
The EU is now in a race against time to complete the text of an accompanying declaration on its future relations with the UK, amid concerns from several member states.
German Chancellor Angela Merkel has indicated she will not attend Sunday's meeting of European leaders - which has been called to approve both the declaration and the withdrawal deal - unless the text on future co-operation is agreed in advance.
The EU had hoped to agree the document, which is not legally binding but will be the starting point for future negotiations, first on Tuesday and then again on Wednesday.
After an hour of talks with European Commission President Jean-Claude Juncker, Mrs. May sought to strike an upbeat note but signaled talks were set to continue until the eve of Sunday's summit.
We've made further progress and as a result we have given sufficient direction to our negotiators, I hope, for them to resolve the remaining issues and that work will start immediately, she said.
I now plan to return for further meetings on Saturday to discuss how we can bring to a conclusion this process and bring it to a conclusion in the interests of all our people.
Under the terms of the draft withdrawal agreement, there will be a 21-month transition period after the UK leaves lasting to the end of 2020.
The future relations document sets out the basis for economic, security and defense co-operation from the start of 2021 onwards.
The UK has said it hopes to agree a trade deal by then although most observers believe it will take much longer, based on other trade agreements.
When it was first published last Wednesday, the document was just seven pages long and has since been extended to 20 pages.
In a statement on Wednesday, the UK said its objectives included a free-trade area for goods with zero tariffs on UK products, an end to membership of the Common Agricultural Policy and the Common Fisheries Policy and ambitious arrangements for trade in services.
The French, Dutch and Danish governments are concerned about the amount of access their fishing fleets will get to British waters.
There are broader concerns about what the Brexit agreement will mean for the future of the single market, if the UK ends up enjoying preferential access to EU markets but does not have to comply with freedom of movement rules.
The other major issue is the future of Gibraltar, the British overseas territory which Spain has long laid claim to.
Spain is insisting that the texts state clearly that any future trade agreements between the EU and the UK will not cover the disputed peninsula and the UK would have to hold direct negotiations with Madrid over how they applied to Gibraltar.