But now a new EU law has shone a light on the future of another tricky frontier, that between Spain and the British territory of Gibraltar.
On Thursday, the European parliament approved a text permitting Britons visa-free visits to the EU even in the event of a “no deal” Brexit.
This wasn't controversial, but an eight-word phrase nestling in a footnote to the text has provoked anger in the British port city at the mouth of the Mediterranean.
“Gibraltar is a colony of the British Crown,” it reads, before noting the “controversy” between Madrid and London over Gibraltar's sovereignty.
Gibraltar is indeed listed by the United Nations as “non self-governing territory”, one of 17 around the world “that remain to be decolonised.”
But Britain — and Gibraltar's government — rejects the term “colony”. Officials dubbed it part of the “United Kingdom family” during the Brexit debate.
British MEP Julia Reid accused Spanish colleagues of “hijacking” the law with “no mandate from parliament to question the sovereignty of Gibraltar.”
The first minister of Gibraltar, Fabian Picardo, furiously denounced the “extreme pressure exerted by Spain and the bullying tactics of Spanish MEPs.”
“This is a disgraceful state of affairs,” he declared.
But the British fury only underscored the success of the Spanish manoeuvre and the underlined how Brexit has already eroded London's standing in Brussels.
Making things clear
Luis Marco Aguiriano, Spain's minister for European Affairs, hailed the “very political and symbolic nature” of the footnote to the visa law.
“This is the first time that an EU text has included the very clear name of 'colony' for the Gibraltarian territory,” he told Radio Onda Cero.
“Brexit is a negative process but, indeed, as far as the Gibraltar issue is concerned, it is making it possible to make things clear, once and for all.”
Spain says when it joined the European Union in 1986 London imposed membership that consigned its claim on Gibraltar to the “drawer of history”.
Now, with Britain leaving the club and Spain staying in, Madrid has seized the chance to press its case.
“This is an important change in the EU's position on the Gibraltar issue,”said Camino Mortera, a senior research fellow at the Centre for European Reform.
“Once the UK leaves the EU, the 27 obviously have to side with the club members, and not with the outgoing side,” she told AFP.
Gibraltar, known as “The Rock”, a strategic 6.5-square-kilometre (2.5-square-mile) peninsula, was captured by an Anglo-Dutch fleet in 1704 and ceded to Britain in 1713.
Spain has a long-standing claim on the territory, but local voters have twice, in 1967 and 2002, overwhelmingly voted to remain British.
In June 2016, however, they also voted by a massive 96 percent for Britain to remain in the EU, only to see the British electorate as a whole reject this.
Now, with Brexit Day officially set for next week, London is finding in its relations with both Spain and Ireland that the Union sides with its continuing members.
Spanish MEP Esteban Gonzalez Pons, defending the legal text, put this case very bluntly.
“The British have decided to leave. It makes no sense that, in addition to leaving, they want to decide what our position should be,” he said.
Analysts do not expect Madrid to mount an immediate drive to reclaim Gibraltar or to push for joint sovereignty, but its hand has been strengthened.
And when post-Brexit Britain comes back to Brussels to negotiate a new political and economic relationship, Spain will wield a veto over any treaty.
“The only thing it wants to make clear is that it is Spain that has to say things about Gibraltar,” said Salvador Llaudes, of the Elcano Royal Institute.
In March, for example, Spain signed a tax treaty with Britain that addressed some of its concerns over tax evasion and money-laundering in Gibraltar.
And now it seems that when it continues to press its issues, it will have the weight of Europe at its back.
By AFP's Toni Cerdá and Dave Clark