The UK has agreed a deal with the European Union over Gibraltar's status after Brexit.
Talks on rules governing the border between Spain and the British Overseas Territory have been ongoing since the UK left the EU in 2020.
The UK said the agreement would avoid the need for checks on people and goods crossing the Gibraltar-Spain border.
For travellers arriving at Gibraltar airport, passport checks will be carried out by Gibraltar and Spanish officials.
Spanish border officials would be able to deny entry as it would be possible for British arrivals to continue their travel into Spain and the EU free-travel area without further checks.
This is similar to the system in place for Eurostar passengers at London's St Pancras station, where travellers pass through both British and French passport control before boarding international trains.
UK Foreign Secretary David Lammy said the deal protected British sovereignty and supported Gibraltar's economy.
He said the "breakthrough" delivered a practical solution, adding: "This government inherited a situation from the last government which put Gibraltar's economy and way of life under threat."
Chief Minister of Gibraltar Fabian Picardo also welcomed the agreement, saying: "I have worked hand in glove with the UK government throughout this negotiation to deliver the deal Gibraltar wants and needs – one that will protect future generations of British Gibraltarians and does not in any way affect our British sovereignty."
Spanish Prime Minister Pedro Sanchez and UK Prime Minister Sir Keir Starmer agreed in a Wednesday evening phone call that the deal "unlocks significant opportunities to strengthen UK-Spain relations".
Downing Street said Sir Keir also called Picardo to congratulate him on the deal and thank him for "his years of hard work, commitment, and leadership to reach an agreement".