The European Union and Britain have agreed to a fluid border between Gibraltar and Spain, clearing the way to finalise a post-Brexit deal on the territory with the EU.
Under the agreement, checks will not be required on people crossing the border.
There will be dual border control checks for arrivals by air at Gibraltar airport, carried out by Gibraltar and Spanish officials.
Negotiations between the UK, Spain, the EU and Gibraltar on a deal made slow progress under the UK's previous Conservative government, but the arrival of Labour last year gave new impetus.
When the UK left the EU in 2020, the relationship between Gibraltar - a key military base for Britain due to its position at the mouth of the Mediterranean Sea - and the bloc remained unresolved.
British foreign secretary David Lammy said the agreement was a "breakthrough" after years of uncertainty and that the UK's commitment to Gibraltar "remains as solid as the Rock itself".
"Alongside the government of Gibraltar, we have a reached an agreement which protects British sovereignty, supports Gibraltar's economy and allows businesses to plan for the long-term once again," Mr Lammy added.
"A truly historic milestone: an EU-UK political agreement on the future relationship concerning Gibraltar. This benefits everyone and reinforces a new chapter in the relationship," EU trade chief Maroš Šefčovič said on X, formerly Twitter.
Gibraltar's chief minister Fabian Picardo said he was "delighted" about the agreement that will bring "legal certainty to the people of Gibraltar, its businesses and to those across the region who rely on stability at the frontier."
The deal, he added, "will protect future generations of British Gibraltarians and does not in any way affect our British sovereignty".
Additional reporting AFP