The government in Madrid has insisted it will not allow the disputed territory of Gibraltar to be affected by agreements made in the Brexit talks between the UK and Brussels without its consent. Madrid wants guarantees that it alone can decide on the future of Gibraltar in direct talks with Britain.

"The guarantees are still not enough and Spain maintains its veto to Brexit. If there is a deal, then it will be lifted," Prime Minister Pedro Sanchez said during a trip to Cuba on Friday. "If there is no deal ... the European Council will most likely not take place" on Sunday.

While Madrid does not legally have a veto over the Brexit deal, it is unlikely the other EU member states would want to adopt the agreement at their meeting on Sunday without Spain's support.

Read more: Germany prepared for no-deal Brexit: Finance Minister Olaf Scholz

Earlier on Friday, Spanish Secretary of State for the European Union Luis Marco Aguiriano said his government wanted a commitment in writing from the UK on clarifications on the status of Gibraltar in the Brexit agreement, so it would not have to vote against the final deal.

A government source said later its demands should be guaranteed in the Brexit treaty and not just in an accompanying political declaration.

Spanish Prime Minister Pedro Sanchez

Attendance in question

Sanchez will not decide on his attendance of Sunday's Brexit exit signing summit with other EU leaders in Brussels until he has seen the written promise, a senior official told reporters on Friday.

"We have demanded that it be published by the British authorities before the European Council on Sunday," Aguiriano Nalda said, adding that Madrid must approve any post-Brexit deal with the EU that involves Gibraltar.

The UK has been accused of introducing a clause into the withdrawal agreement that Gibraltar would be covered by any future trade agreement it made with the EU. "We want a deal that works for the whole UK family, and that includes Gibraltar," Prime Minister Theresa May told parliament this week.

Veto threat

Late on Thursday night, Spanish Prime Minister Pedro Sanchez wrote on Twitter: "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."

Again on Friday, a Spanish government source told Reuters: "We don't have enough guarantees on Gibraltar and the future relationship with the EU, and our veto to the Brexit deal and the political declaration remains."

Gibraltar's Chief Minister Fabian Picardo said on Friday he had been talking to the Spanish government and had reached agreement over its place in the Brexit withdrawal agreement.

Spanish, British and EC negotiators were still looking for an agreement on Friday evening. May is due in Brussels on Saturday evening to meet with European Commission President Jean-Claude Juncker and European Council President Donald Tusk, who is to chair Sunday's summit.

A Barbary macaque on the rock of Gibraltar

The headland on Spain's south coast has been a British Overseas Territory since 1713 but Spain has long claimed sovereignty.

Gibraltarians voted 96 percent in favor of staying in the EU in the 2016 referendum. They also voted overwhelmingly against Spanish and later against joint UK-Spanish control in a pair of plebiscites in 1967 and 2002.

jm/msh (Reuters, AFP)

Each evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.