Madrid has a long-standing claim on Gibraltar, which was ceded to the British crown in the 1713 Treaty of Utrecht, that predates the Brexit negotiations.
Britain's Prime Minister Theresa May is due to sign a treaty with European Union leaders to leave the bloc on Sunday, if Spain does not stand in the way.
But Spain's Foreign Minister Josep Borrell warned on Monday after a meeting of EU ministers that the draft deal does not spell out how Gibraltar should be handled.
He said the text does not make it clear that future negotiations on ties between Brussels and post-Brexit Britain are separate from the Gibraltar issue.
“Future negotiations on Gibraltar are separate negotiations. And that is what needs to be made clear,” Borrell said.
“Until it is clear … we will not be able to give our agreement”, he warned.
According to Article 184 of the draft divorce deal, “the EU and the United Kingdom shall make every effort, in good faith and with full respect for their respective legal systems, to adopt the measures necessary to negotiate rapidly the agreements governing their future relationship.”
These agreements will be negotiated between Brexit day on March 29th and December 2020 — extendable once — and will enter into force at the end of the period.
But Spain wants to retain what it sees as its right to negotiate the future on Gibraltar with Britain on a bilateral basis, giving it an effective veto.
Although the legal service of the EU Council has tried to reassure Spain that the text does not preclude this, Madrid is seeking further clarification.
“Until we have the future declaration and we know what it says, whether we agree or not, we are not going to approve the withdrawal agreement either,” Borrell said.
In London, May's spokesman said: “The draft withdrawal agreement agreed last week covers Gibraltar.
“The PM has been clear that we will not exclude Gibraltar, and the other overseas territories and the crown dependences from our negotiations on the future relationship. We will get a deal that works for the whole UK family.”
Gibraltar Chief Minister Fabian Picardo said the position adopted by Madrid “does little to build mutual confidence and trust going forward.”
Over the weekend, European diplomats said they did not expect Spain's concerns to derail the agreement.