Pedro Sanchez, Spain’s prime minister, has publicly warned he will “veto Brexit” over the issue of Gibraltar and warned Sunday's EU summit may be called off if no agreement is reached.

Spain says the future relationship to be negotiated between the EU and UK should not apply to Gibraltar and that it should only be decided bilaterally between itself and Britain.

But Theresa May has rejected this idea and said the plan must apply to “the whole United Kingdom family” – a group that apparently includes the British Overseas Territory.

“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,” Mr Sanchez said.

He later added: "If there is no deal, it's obvious that what will happen is that the European Council will most likely not take place."

The Spanish government does not have the power to veto the UK’s departure from the European Union, nor can it single-handedly block the withdrawal agreement.

It can vote against the withdrawal agreement, but would require support from other countries to block it because the deal will be approved by a qualified majority voting at the European Council.

The one area where Spain can cause significant problems for the UK’s departure, however, is in the case of the future trade agreement – which Ms May says should be signed within the 21-month transition period that starts next March.

Every national legislature and government in the EU would have to agree to such a trade deal. There is plenty of precedent for this: in the past EU-wide deals have been blocked by entities including the parliament of Wallonia, a Belgian region.

The UK has held Gibraltar since 1704 and it was formally ceded as territory in a treaty in 1713. It is a self-governing British overseas territory.

The Gibraltar issue is controversial with the Spanish public, with successive governments benefiting politically by grandstanding on the matter. It became an official policy of the Spanish government to regain control of the rock during the dictatorship of General Franco, and it has been so ever since.

People's Vote march – demanding vote on final Brexit deal Show all 30 1 /30 People's Vote march – demanding vote on final Brexit deal People's Vote march – demanding vote on final Brexit deal Mandatory Credit: Photo by Guy Bell/REX (9725259aq) Marching down Whitehall - People's March for a People's Vote on the final Brexit deal. Timed to coincide with the second anniversary of the 2016 referendum it is organised by anti Brexit, pro EU campaigners. People's March for a People's Vote, London, UK - 23 Jun 2018 Guy Bell/REX Rex People's Vote march – demanding vote on final Brexit deal Demonstrators carry banners and flags as they participate in the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, the second anniversary of the 2016 referendum. Tens of thousands of people demonstrated in London on Saturday calling for a second vote on Britain's departure from the European Union. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty Images People's Vote march – demanding vote on final Brexit deal A young protestor shouts as she takes part in the People's Vote demonstration against Brexit Getty Images People's Vote march – demanding vote on final Brexit deal A woman holds a placard as she joins EU supporters, calling on the government to give Britons a vote on the final Brexit deal, participating in the 'People's Vote' march in central London, Britain June 23, 2018. REUTERS/Henry Nicholls HENRY NICHOLLS Reuters People's Vote march – demanding vote on final Brexit deal epa06833888 Pro-EU demonstrators take part in a People's March anti-Brexit rally in Parliament Square in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal A protester's pro-EU t-shirt EPA People's Vote march – demanding vote on final Brexit deal epa06833892 A pro-EU demonstrator waves a European Flag during a People's March anti-Brexit rally in Parliament Square in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Demonstrators carry banners and flags as they participate in the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, the second anniversary of the 2016 referendum. Tens of thousands of people demonstrated in London on Saturday calling for a second vote on Britain's departure from the European Union. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty Images People's Vote march – demanding vote on final Brexit deal epa06833960 Tens of thousands of people march through London during a People's March anti-Brexit demonstration in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Leader of the Liberal Democrats, Vince Cable speaks during the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, the second anniversary of the 2016 referendum. Tens of thousands of people demonstrated in London on Saturday calling for a second vote on Britain's departure from the European Union. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty People's Vote march – demanding vote on final Brexit deal epa06833964 A young pro-EU demonstrator takes part in a People's March anti-Brexit rally in Parliament Square in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Gina Miller and Caroline Lucas EPA People's Vote march – demanding vote on final Brexit deal epa06834044 Tens of thousands of people march through London during a People's March anti-Brexit demonstration, in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal epa06833264 Thousands of people march through London during a People's March anti Brexit demonstration in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Tens of thousands of people march through London EPA People's Vote march – demanding vote on final Brexit deal epa06833265 Thousands of people march through London during a People's March anti Brexit demonstration in London, Britain, 23 June 2018. Protesters are calling for a referendum on the final deal. The protest is taking place on the second anniversary of the Brexit referendum. EPA/ANDY RAIN ANDY RAIN EPA People's Vote march – demanding vote on final Brexit deal Demonstrators at the People's Vote March Getty People's Vote march – demanding vote on final Brexit deal 'Two months too young to decide on my future' REUTERS People's Vote march – demanding vote on final Brexit deal Crowds taking part in the People's Vote march for a second EU referendum at Trafalgar Square in central London. PRESS ASSOCIATION Photo. Picture date: Saturday June 23, 2018. See PA story POLITICS Brexit. Photo credit should read: John Stillwell/PA Wire John Stillwell PA People's Vote march – demanding vote on final Brexit deal A young girl joins in the march PA People's Vote march – demanding vote on final Brexit deal An EU flag is draped across the statue of Winston Chruchill in Parliament Square REUTERS People's Vote march – demanding vote on final Brexit deal Demonstrators gather prior to the start of the People's March demanding a People's Vote on the final Brexit deal, in central London on June 23, 2018, on the second anniversary of the 2016 referendum. / AFP PHOTO / Niklas HALLE'NNIKLAS HALLE'N/AFP/Getty Images NIKLAS HALLE'N AFP/Getty Images People's Vote march – demanding vote on final Brexit deal Vince Cable MP, Pro-EU campaigner Gina Miller, Tony Robinson and Caroline Lucas MP join with crowds PA People's Vote march – demanding vote on final Brexit deal Crowds gather on Pall Mall in central London, during the People's Vote march for a second EU referendum. PRESS ASSOCIATION Photo. Picture date: Saturday June 23, 2018. See PA story POLITICS Brexit. Photo credit should read: John Stillwell/PA Wire John Stillwell PA People's Vote march – demanding vote on final Brexit deal Crowds gather on Pall Mall PA People's Vote march – demanding vote on final Brexit deal A man resembling Britain's Foreign Secretary Boris Johnson, joins EU supporters Reuters People's Vote march – demanding vote on final Brexit deal EU supporters, calling on the government to give Britons a vote on the final Brexit deal, participate in the 'People's Vote' march in central London, Britain June 23, 2018. REUTERS/Henry Nicholls HENRY NICHOLLS Reuters People's Vote march – demanding vote on final Brexit deal People gather in Trafalgar Square REUTERS People's Vote march – demanding vote on final Brexit deal Pro-EU campaigner Gina Miller and Tony Robinson PA People's Vote march – demanding vote on final Brexit deal EU supporters, calling on the government to give Britons a vote on the final Brexit deal, participate in the 'People's Vote' march REUTERS

Polls and referendums have repeatedly shown Gibraltans are overwhelmingly in favour of staying tied to Britain.

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.