Gibraltar should be excluded from all agreements between Britain and the European Union once Britain has left the European Union, Spanish diplomatic sources said on January 30.

Prime Minister Pedro Sanchez has said Spain intends to revive its bid for shared sovereignty over Gibraltar, a British territory since 1713, after Brexit.

The Reuters news agency quoted a source as saying: “In every agreement reached with Great Britain there will be an asterisk which explains that the deal will not affect Gibraltar.”

Spain has long claimed sovereignty over Gibraltar, a rocky peninsula attached to southern Spain by a narrow causeway.

Gibraltar is due to leave the EU together with Britain, but Madrid’s claim to it has been boosted by the fact that 97% of its citizens voted to remain in the EU in Britain’s 2016 referendum on leaving Europe.

“After Brexit, Spain wants to include in writing in every document signed with the EU that it has nothing to do with Gibraltar, which should be based on a different relationship,” said the source. “This strategy will be followed in all agreements that will be signed.”

According to Reuters, the dispute between Madrid and London over Gibraltar had threatened to derail the Brexit negotiation process in November, but a last-minute deal cleared the way for the 27 EU states to approve the divorce package.