Negotiators have just 24 hours left to resolve outstanding issues with the Brexit deal if a summit on Sunday is to go ahead, Brussels has warned.

A senior EU official said on Wednesday that time was running out to produce a final text in time for the planned summit, with last-minute concerns around fishing rights and Gibraltar threatening to sink the plan.

Although Britain and the European Commission struck a draft withdrawal agreement and future relationship plan last week, a number of member states have raised significant concerns with the proposals and declined to sign off.

Angela Merkel has now also threatened to pull out of the summit if no agreement is ready in time for the meeting, according to diplomats in Brussels. The ultimatum is being interpreted as a bid to avoid late-night sessions of face-to-face negotiations between leaders.

The commission is keen that the Sunday summit be little more than a glorified rubber-stamp, with the deal having been signed off beforehand – but the stipulation appears to be risking the entire meeting.

Commission vice president Valdis Dombrovskis told reporters in Brussels that a final agreement would have to be done before a key meeting of national officials on Friday at the latest, if it was to be ready for the Sunday summit.

“We will need to have agreed beforehand on the political declaration on the future relationship and we are not there yet,” he said, addressing the issue of the summit.

“Sherpas are due to meet on Friday. Of course they will need to see a final text before then and the commission stands ready to consider the text and take any action at any time.”

Asked if Sunday’s special EU summit to sign off the Brexit deal could be cancelled because of the deadlock, the prime minister’s spokesman said: “A summit has been called, an agenda has been published and we look forward to attending.”

Theresa May travelled to Brussels on Wednesday evening to meet with commission president Jean-Claude Juncker in the hope of resolving the impasse. She told reporters after the meeting that she would return on Saturday for another meeting with Mr Juncker, and that there ”are some further issues that need resolution” that she hoped could be resolved.

“We have had a very good meeting this evening. We have made further progress and as a result, we have given sufficient direction to our negotiators,” the PM said. ”I hope for them to be able to resolve the remaining issues and that work will start immediately.”

A commission spokesperson said: “Very good progress was made in the meeting between President Juncker and Prime Minister Theresa May. Work is continuing.”

We will need to have agreed beforehand on the political declaration on the future relationship and we are not there yet Valdis Dombrovskis, EU commission vice president

The prime minister is under pressure at home from MPs in her own party who see the deal as too tough on Britain, but in Brussels she is also facing opposition from member states who feel the EU has given away too much already. A failure to gain more concessions from Europe is expected to see her cabinet again rocked by yet more resignations.

Spain in particular has raised concerns about Gibraltar’s treatment under the draft plan - prime minister Pedro Sanchez insisted he would vote against the draft deal unless he wins assurances over the disputed peninsula of Gibraltar.

On Wednesday night, Ms May spoke to Mr 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."

Meanwhile other member states such as France, Denmark, Spain, Portugal and the Netherlands are concerned that the commission did not secure access for their fishing fleets to British waters.

The fishing section of the agreement commits the EU and UK to negotiating a fishing agreement by July 2020, during the transition period. But the group of discontent member states, led by France, is concerned that the EU has given Britain access to the benefits of the customs union through the Northern Ireland backstop without securing access for its fleets first.

The situation is particularly sensitive because Brexiteers also want to reopen the deal, but have been told they cannot do so. Reopening it to make it harsher on Britain would probably enrage them further – and add to the 70-plus Tory MPs who have now suggested they cannot vote for the plan.

Diplomats familiar with the situation suggested the changes could be accommodated by so-called “side-declarations” that would avoid reopening talks on the agreement but give clear stipulations about how the EU expected the legal text to be interpreted.

Aside from the fishing issue, Spain is demanding concessions for Gibraltar, with Prime Minister Pedro Sanchez warning: “If there are no changes regarding Gibraltar, Spain will vote no to the agreement on Brexit.”

Spanish foreign minister Josep Borrell: Spain will not back Brexit deal over issue of Gibraltar

The country takes issue with a clause added to the withdrawal agreement at the last minute – article 184. The article says the EU and the UK will seek to “negotiate rapidly the agreements governing their future relationship” before the end of the transition.

But Spain wants an addition to the text specifying that Gibraltar will not be covered by that agreement, and that it is for Spain and Britain to negotiate the future of the territory bilaterally.

Neither side appears willing to give ground on the issue, with Theresa May telling MPs on Wednesday: “Gibraltar is covered by our exit negotiations … We are seeking a deal that works for the whole UK family and that deal must work for Gibraltar too.”

The withdrawal agreement must be approved by a qualified majority vote of the European Council, meaning Spain alone cannot sink the deal without the support of other countries – although it could cause serious trouble down the line and veto a future trade agreement if the issue is not resolved now.

If Spain and the fishing states joined forces, they would have the numbers to block the agreement.

A historic moment: thousands march to demand Final Say on Brexit Show all 65 1 /65 A historic moment: thousands march to demand Final Say on Brexit A historic moment: thousands march to demand Final Say on Brexit An estimated 700,000 people marched through London to demand a final say on the withdrawal agreement Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Red smoke from a canister hangs in the air as around 100,000 demonstrators march through London during a People's Vote anti-brexit demonstration savings banners and placards Anti-Brexit People's Vote March for the Future in London Rex A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Mayor of London Sadiq Khan takes part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA A historic moment: thousands march to demand Final Say on Brexit Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Protesters wearing final Say shirts and holding placards Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit MP Chuka Umunna (left) and MP Vince Cable (right) as MP Anna Soubry (centre) addresses Anti-Brexit campaigners at a rally after the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit A People’s Vote march attendee calls for a Final Say Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Demonstrators with banners 'We're with EU' during the People's Vote March for the Future in London, Britain, 20 October 2018. Reports state that the 'March for the Future' is to be led by a column of young people and call for a Peopleâ€™s Vote on the Brexit deal. After marching through central London, there will be a rally on stage in Parliament Square, including speeches from Mayor of London Sadiq Khan. EPA A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Protesters at London’s march for the future in October The Independent A historic moment: thousands march to demand Final Say on Brexit Editor of The Independent Christian Broughton speaks to demonstrators in Parliament Sqaure after they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty A historic moment: thousands march to demand Final Say on Brexit A poster at the March for the Future in October The Independent A historic moment: thousands march to demand Final Say on Brexit Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Demonstrators hold placards as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final say Brexit march - final say on our furture London, 20 October 2018 Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 campaigner wrapped in EU flag Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say march for the future London, 20 October 2018 Credit: Angela Christofilou/The Independent Angela Christofilou/The Independent Angela Christofilou/The Independent A historic moment: thousands march to demand Final Say on Brexit Final Say campaigners take part in the peoples vote march for the future in London 20/10/2018 Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Demonstrators pass Trafalgar Square as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty A historic moment: thousands march to demand Final Say on Brexit Demonstrators wave Union and European flags and hold up placards as they pass Trafalgar Square, taking part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty A historic moment: thousands march to demand Final Say on Brexit Demonstrators hold placards as they take part in a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty A historic moment: thousands march to demand Final Say on Brexit A demonstrator holds a message during a march calling for a People's Vote on the final Brexit deal, in central London on October 20, 2018. - Britons dreading life outside Europe gathered from all corners of the UK to London on Saturday to try to stop their country's looming breakup with the EU. AFP/Getty A historic moment: thousands march to demand Final Say on Brexit Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum. PA A historic moment: thousands march to demand Final Say on Brexit Demonstrators take part in the 'People's Vote March for the Future,' in central London, Britain, 20 October 2018. Reports state that the 'March for the Future' is to be led by a column of young people and call for a Peopleâ€™s Vote on the Brexit deal. After marching through central London, there will be a rally on stage in Parliament Square, including speeches from Mayor of London Sadiq Khan EPA A historic moment: thousands march to demand Final Say on Brexit A protester brandishes an Independent t-shirt during the Brexit March Angela Christofilou A historic moment: thousands march to demand Final Say on Brexit Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum PA A historic moment: thousands march to demand Final Say on Brexit Tens of thousands of people take part in People's Vote March for the Future in central London. The march organised by the People's Vote campaign is led by young people calling for a People's Vote on the Brexit deal Rex A historic moment: thousands march to demand Final Say on Brexit Anti-Brexit campaigners take part in the People's Vote March for the Future in London, a march and rally in support of a second EU referendum PA

Spain has long resented Britain’s claims on Gibraltar, a British overseas territory that is home to around 30,000 people, and has previously threatened to use Brexit to wrest concessions on the issue.

The upsurge in interest in the Gibraltar issue could be down to the fact that the Spanish region of Andalusia has local elections scheduled for 2 December – just a week after the final Brexit summit.