The easy flow of people and goods across the border from Spain which underpins the economy of Gibraltar, a tiny British territory on the southern tip of the Iberian Peninsula, risks ending when Britain leaves the EU at midnight on December 31.
“Spain and the United Kingdom are continuing dialogue to reach an accord on Gibraltar,” Sanchez said on his Twitter account after hailing the accord between Brussels and London.
Madrid, London and Gibraltar have been working out the status issues separately from the 10 months of Brexit trade negotiations that finally ended Thursday's deal.
“For us… the clock is still ticking,” said Gibraltar government chief Fabian Picardo, while adding that he was “optimistic that we will be able to finalise that agreement.”
The enclave is entirely dependent on imports to supply its 34,000 residents, and each day some 15,000 people cross into Gibraltar from Spain every day to work, accounting for half of the territory's workforce.
Without an accord, the movement of goods between Gibraltar and Spain will be subject to customs procedures from January 1, with unwanted economic consequences.
Picardo told AFP late last month that Gibraltar was considering joining the visa-free Schengen area — which Britain has never been part of — to avoid this hurdle.
“We are looking for an accord that will allow maximum fluidity,” he said.
Spain ceded Gibraltar to Britain in perpetuity in 1713 following a military struggle, but Madrid has long wanted it back.
In 2013, a dispute over an artificial reef in waters claimed by both sides sparked a war of words that triggered months of gridlock at the border after Spain intensified checks, which ended only after Brussels stepped in.