MADRID — The recent Brexit trade deal generated relief in Britain and the European Union, but some issues were left on the negotiating table — including what to do about Gibraltar, the British territory at the southern tip of Spain whose sovereignty has long been disputed by Madrid.
On Thursday, the Spanish foreign minister, Arancha González Laya, announced a last-minute agreement with negotiators in Britain and Gibraltar that avoids the possibility of travelers and goods being stranded at the border from Friday.
The draft agreement will allow passport-free travel between Gibraltar and Spain. As part of the deal, a European agency will monitor sea and air arrivals in Gibraltar. People arriving from Britain will need to go through passport control, as they do now.
“We have understood the need to manage our interdependency,” Ms. González Laya said at a news conference. While she insisted that “sovereignty is something inalienable for both sides,” she described the agreement as “a solid base for the future relationship between Spain and the United Kingdom.”
Spain had pushed for the talks over Gibraltar to be separate from the main Brexit negotiations between Britain and the European Union.
Known as the Rock because of the dominant feature of its 2.6-square-mile territory, Gibraltar has long punched above its weight in military and economic significance, as a gateway to the Mediterranean but also a financial hub that applies significantly lower corporate taxation than Britain.
Given their geographic isolation, Gibraltar’s residents and officials were fearful about the consequences of Brexit before the referendum in 2016, in which 96 percent of Gibraltar voters sought to remain in the European Union but Britons overall voted to leave.
Negotiators in Madrid, London and Gibraltar — working by videoconference — spent recent weeks scrambling to beat a Jan. 1 deadline for an agreement to ensure the smooth movement of goods and people in and out of Gibraltar, even with Britain no longer part of the European Union.
Issues including the mutual recognition of labor permits and drivers’ licenses were sorted out relatively easily, but the sticking points were what Gibraltar’s border means and who should police it.
Fearing border checks that could leave it isolated and economically pinched, Gibraltar wanted control-free access to the Spanish mainland, similar to that enjoyed between the European countries that are part of the Schengen area, in which travel checks have only been reintroduced in emergencies such as the coronavirus pandemic.
There are now limited border controls in place in Gibraltar, because Britain has never been part of the Schengen agreement. After Brexit, Spain wanted to ensure that the territory did not become a check-free point of entry for people traveling on to the Spanish mainland.
Ms. González Laya said that it could take about six months for Thursday’s agreement to be formalized into a new treaty between the European Union and Britain over Gibraltar, but she promised that Spain would “keep traffic the most fluid possible” across the territory’s border in the meantime.
“We believe that we may now be able to reset our relationship with Spain and cast it in a more positive light,” Fabian Picardo, the leader of Gibraltar, told a separate news conference after the deal was struck. “We are going to avert the worst effects of a hard Brexit.”
The talks had slowed because Spain wanted to take charge of policing the border, but Gibraltar proposed instead that it be handled by Frontex, a European Union agency that monitors the borders of countries in the Schengen zone.
Under the compromise announced on Thursday, “Schengen will be applied to Gibraltar with Spain as the responsible member for the control of Schengen,” in collaboration with Frontex over the coming four years, Ms. González Laya said. Frontex officers will control passengers in the port and airport of Gibraltar.
Officials in Brussels have not been involved in the latest Gibraltar talks, while the government of Prime Minister Boris Johnson of Britain had insisted that a new border deal should have no impact on British sovereignty and the free flow between Britain and Gibraltar.
The extended negotiations over Gibraltar exasperated those who have to cross the border daily, with businesses that transport goods across the border already suffering from the effects of the pandemic.
“This is part of the eternal dispute over Gibraltar’s sovereignty, but the negotiators should really have been able to resolve this earlier and not force us to end the year in a situation of complete border uncertainty, when we already have to confront a worsening rate of coronavirus in Gibraltar,” said Jesús Moya, a Spanish employee of a food distribution company in Gibraltar, who commutes from his home in Spain. “Having a normal trade flow is essential, not only for Gibraltar but also for Spain.”
About 2,000 of Gibraltar’s nearly 34,000 residents are now isolating because of the coronavirus, and the authorities there decided before Christmas to close the border with Britain, to contain the spread of a new and seemingly more contagious virus variant.
Given their geographic isolation at the southern tip of Spain, Gibraltar’s residents and officials were fearful about the consequences of Brexit before the referendum in 2016, which was endorsed by an overall majority of Britons, but rejected by 96 percent of voters in Gibraltar.
Britain has handled Gibraltar’s defense and international relations since securing control over the territory in the 1713 Treaty of Utrecht. Gibraltar’s government has significant autonomy over trade and fiscal issues, which has helped it become a European hub for financial services and online gaming.
In 1969, under Gen. Francisco Franco, Spain closed the border with Gibraltar, leaving the territory reliant on supplies and funding from Britain. Even if it has not barricaded the border in more recent years, Spain has occasionally created significant problems for Gibraltar by enforcing stricter customs controls, leaving people and vehicles waiting for hours to cross. In the past decade, Britain and Spain have also feuded over access to the waters off Gibraltar.
But any Spanish tightening of controls at Gibraltar’s land border also hurts about 10,000 workers like Mr. Moya who commute there daily, mostly from nearby towns that form an economically depressed area known as the Campo de Gibraltar.
“We are answering the aspirations of our citizens,” Ms. González Laya said. The deal would allow residents of nearby Spanish towns to “breathe a sigh of relief,” she added, while avoiding a situation in which residents of Gibraltar risked facing “the only hard Brexit border” in Europe, even though they had voted overwhelmingly to remain in the bloc.