BERLIN, GERMANY - FEBRUARY 16: British Prime Minister Theresa May speak to the media following talks between the two leaders at the Chancellery on February 16, 2018 in Berlin, Germany. May is in Germany to attend the Munich Security Conference tomorrow. (Photo by Michele Tantussi/Getty Images)
Michele Tantussi/Getty Images
BERLIN, GERMANY - FEBRUARY 16: British Prime Minister Theresa May speak to the media following talks between the two leaders at the Chancellery on February 16, 2018 in Berlin, Germany. May is in Germany to attend the Munich Security Conference tomorrow. (Photo by Michele Tantussi/Getty Images)
Now playing
01:28
What's next for Brexit?
Britain's Prime Minister Theresa May delivers a speech outside 10 Downing Street in London, Wednesday, Nov. 14, 2018. British Prime Minister Theresa May says Cabinet agrees draft Brexit deal with European Union after 'impassioned' debate. (AP Photo/Matt Dunham)
Matt Dunham/AP
Britain's Prime Minister Theresa May delivers a speech outside 10 Downing Street in London, Wednesday, Nov. 14, 2018. British Prime Minister Theresa May says Cabinet agrees draft Brexit deal with European Union after 'impassioned' debate. (AP Photo/Matt Dunham)
Now playing
03:21
Theresa May: Cabinet backs Brexit draft deal
Reuters
Now playing
02:11
Theresa May begins speech with dance
SALZBURG, AUSTRIA - SEPTEMBER 20:  British Prime Minister Theresa May speaks to the media at the conclusion of the summit of leaders of the European Union on September 20, 2018 in Salzburg, Austria. Earlier in the day European Council President Donald Tusk expressed doubt over the United Kingdom's proposal regarding its Brexit negotiations.  (Photo by Sean Gallup/Getty Images)
Sean Gallup/Getty Images
SALZBURG, AUSTRIA - SEPTEMBER 20: British Prime Minister Theresa May speaks to the media at the conclusion of the summit of leaders of the European Union on September 20, 2018 in Salzburg, Austria. Earlier in the day European Council President Donald Tusk expressed doubt over the United Kingdom's proposal regarding its Brexit negotiations. (Photo by Sean Gallup/Getty Images)
Now playing
00:41
Theresa May: 'We are at an impasse'
LONDON, ENGLAND - SEPTEMBER 21: British Prime Minister Theresa May makes a statement on Brexit negotiations with the European Union at Number 10 Downing Street on September 21, 2018 in London, England. Mrs May reiterated that a no-deal Brexit is better than a bad deal in a speech to the British people after the EU rejected her Chequers Plan for leaving the European Union. She said the UK is at an impasse with the EU and the two big issues are trade and Ireland. (Photo by Jack Taylor/Getty Images)
Jack Taylor/Getty Images
LONDON, ENGLAND - SEPTEMBER 21: British Prime Minister Theresa May makes a statement on Brexit negotiations with the European Union at Number 10 Downing Street on September 21, 2018 in London, England. Mrs May reiterated that a no-deal Brexit is better than a bad deal in a speech to the British people after the EU rejected her Chequers Plan for leaving the European Union. She said the UK is at an impasse with the EU and the two big issues are trade and Ireland. (Photo by Jack Taylor/Getty Images)
Now playing
02:37
Theresa May demands 'respect' from EU
British Prime Minister Theresa May leaves 10 Downing Street in central London on April 19, 2017 ahead of the weekly Prime Minister's Questions session in the House of Commons. 

British Prime Minister Theresa May called on April 18 for a snap election on June 8, in a shock move as she seeks to bolster her position before tough talks on leaving the EU. MPs are set to vote on the motion following Prime Minister's Questions in the House of Commons. / AFP PHOTO / CHRIS J RATCLIFFE        (Photo credit should read CHRIS J RATCLIFFE/AFP/Getty Images)
CHRIS J RATCLIFFE/AFP/Getty Images
British Prime Minister Theresa May leaves 10 Downing Street in central London on April 19, 2017 ahead of the weekly Prime Minister's Questions session in the House of Commons. British Prime Minister Theresa May called on April 18 for a snap election on June 8, in a shock move as she seeks to bolster her position before tough talks on leaving the EU. MPs are set to vote on the motion following Prime Minister's Questions in the House of Commons. / AFP PHOTO / CHRIS J RATCLIFFE (Photo credit should read CHRIS J RATCLIFFE/AFP/Getty Images)
Now playing
01:14
Theresa May: What you need to know
theresa may brexit speech_00000000.jpg
Bowtie TV
theresa may brexit speech_00000000.jpg
Now playing
03:16
UK triggers Article 50 to begin Brexit
LONDON, ENGLAND - APRIL 18:  Prime Minister Theresa May makes a statement to the nation in Downing Street on April 18, 2017 in London, United Kingdom. The Prime Minister has called a general election for the United Kingdom to be held on June 8, the last election was held in 2015 with a Conservative party majority win.  (Photo by Dan Kitwood/Getty Images)
Dan Kitwood/Getty Images
LONDON, ENGLAND - APRIL 18: Prime Minister Theresa May makes a statement to the nation in Downing Street on April 18, 2017 in London, United Kingdom. The Prime Minister has called a general election for the United Kingdom to be held on June 8, the last election was held in 2015 with a Conservative party majority win. (Photo by Dan Kitwood/Getty Images)
Now playing
06:53
UK PM calls for general election: Full speech
Now playing
00:50
May's comment brings laughs to Parliament
theresa may brexit speech_00010529.jpg
Bowtie TV
theresa may brexit speech_00010529.jpg
Now playing
02:59
May: It's time to build a stronger Britain
WASHINGTON, DC - JANUARY 27:  British Prime Minister Theresa May and U.S. President Donald Trump walk along The Colonnade of the West Wing at The White House on January 27, 2017 in Washington, DC. British Prime Minister Theresa May is on a two-day visit to the United States and will be the first world leader to meet with President Donald Trump.  (Photo by Christopher Furlong/Getty Images)
Getty Images
WASHINGTON, DC - JANUARY 27: British Prime Minister Theresa May and U.S. President Donald Trump walk along The Colonnade of the West Wing at The White House on January 27, 2017 in Washington, DC. British Prime Minister Theresa May is on a two-day visit to the United States and will be the first world leader to meet with President Donald Trump. (Photo by Christopher Furlong/Getty Images)
Now playing
02:04
British PM reveals why Trump held her hand
British Prime Minister Theresa May speaks outside 10 Downing Street in central London on March 22, 2017, following the terror incident in Parliament earlier today.
Britain will not change its terrorism threat level despite an attack in London on Wednesday which left three people and the assailant dead, Prime Minister Theresa May said. Three people were killed in a "terrorist" attack in the heart of London Wednesday when a man mowed down pedestrians on a bridge, then stabbed a police officer outside parliament before being shot dead. / AFP PHOTO / POOL / RICHARD POHLE        (Photo credit should read RICHARD POHLE/AFP/Getty Images)
RICHARD POHLE/AFP/AFP/Getty Images
British Prime Minister Theresa May speaks outside 10 Downing Street in central London on March 22, 2017, following the terror incident in Parliament earlier today. Britain will not change its terrorism threat level despite an attack in London on Wednesday which left three people and the assailant dead, Prime Minister Theresa May said. Three people were killed in a "terrorist" attack in the heart of London Wednesday when a man mowed down pedestrians on a bridge, then stabbed a police officer outside parliament before being shot dead. / AFP PHOTO / POOL / RICHARD POHLE (Photo credit should read RICHARD POHLE/AFP/Getty Images)
Now playing
00:48
Theresa May: UK will never give in to terror
LONDON, ENGLAND - JANUARY 24: British Prime Minister Theresa May leaves 10 Downing Street on January 24, 2017 in London, England. British Supreme Court judges have today ruled by a majority of 8 to 3 that the government cannot trigger Article 50 without an act of Parliament. (Photo by Jack Taylor/Getty Images)
Jack Taylor/Getty Images
LONDON, ENGLAND - JANUARY 24: British Prime Minister Theresa May leaves 10 Downing Street on January 24, 2017 in London, England. British Supreme Court judges have today ruled by a majority of 8 to 3 that the government cannot trigger Article 50 without an act of Parliament. (Photo by Jack Taylor/Getty Images)
Now playing
02:37
Theresa May faces opposition over Trump
UK Prime Minister visits tomb of unknown solider_00000720.jpg
CNN
UK Prime Minister visits tomb of unknown solider_00000720.jpg
Now playing
01:09
UK Prime Minister visits Arlington cemetery
UK PM Theresa May and President Trump at a press conference
CNN
UK PM Theresa May and President Trump at a press conference
Now playing
02:33
May on special relationship, Trump on torture
(CNN) —  

British Prime Minister Theresa May’s efforts to pass a Brexit deal have suffered a further setback after Spain threatened to veto her draft divorce agreement over the handling of Gibraltar.

Madrid has objected to part of the deal that covers future trade and security relations between the UK and the European Union. It insists arrangements relating to Gibraltar, a small British territory on the southern tip of Spain, should be discussed separately.

Spain would not back the deal until the issue is clarified, Spanish Foreign Minister Josep Borrell said after discussions with EU chief negotiator Michel Barnier and EU ambassadors.

Spain has long claimed sovereignty over Gibraltar, which has been a British territory since 1713. But Gibraltarians, who voted almost unanimously to remain in the European Union in the 2016 referendum, are fiercely loyal to Britain and have resisted Spanish claims.

The draft Brexit deal must be agreed on at an EU summit on November 25. An EU official told CNN that it was likely the issue would be ironed out before the EU Council meets over the weekend: “I am confident this will be solved before Sunday,” the official said.

But Madrid’s objections will frustrate May’s efforts to see the deal through the EU smoothly before it returns to the UK Parliament for a final vote.

Spain wants negotiations over future arrangements for Gibraltar to be conducted separately from wider trade and security discussions.

A spokesman for May said Gibraltar should be included in the talks over the future relationship between the UK and the EU. “The PM has been clear that we will not exclude Gibraltar and the other overseas territories and crown dependencies from our negotiations on the future relationship.”

Gibraltar’s Chief Minister Fabian Picardo said that the Spanish government’s position “does little to build mutual confidence and trust going forward.”

“The language of vetoes and exclusions should be the language of the past,” he added.

Further troubles for May

May’s fight to save her under-fire Brexit deal, which prompted a series of resignations from her government last week, was further damaged Tuesday by the refusal of Democratic Unionist Party members to back her government in a number of finance votes in the UK Parliament.

Under the terms of an agreement between the DUP and the Conservatives, the Northern Irish pary’s 10 members of Parliament vote with the government on key legislation. The DUP’s decision to breach the deal on Tuesday night was seen as a warning shot to May.

Its support is crucial if May is to have a chance of pushing her EU withdrawal deal through Parliament. But the DUP has fiercely criticized the draft agreement since it was published last week.

A further blow was handed to May by the UK’s Supreme Court, which refused to hear a government appeal in a case over whether Article 50, the section of the Lisbon Treaty that triggered the Brexit process, can be unilaterally revoked.

The case, brought by a group of lawmakers who support remaining in the EU, is being heard by Scotland’s highest court, the Court of Session. The government had opposed the Court of Session’s decision to refer it to the European Court of Justice, fearful that a successful ruling in Strasbourg would embolden British lawmakers to call for Article 50 to be rescinded.

“We are disappointed by the decision of the court and it remains a matter of firm policy that we will not be revoking Article 50,” a government spokesman said.

CNN’s Erin McLaughlin contributed reporting from Brussels