Gibraltar's border with Spain will remain open after the UK and European Union struck a last-minute deal just before the end of the Brexit transition.
The 11th hour breakthrough means the Rock, home to 34,000 people, will join the EU's Schengen area, allowing free movement and avoiding a hard border.
About 15,000 Spanish workers go to Gibraltar, whose British sovereignty is disputed by Madrid, every day.
Its status was not covered in the trade agreement reached by the UK and EU on Christmas Eve, prompting concerns about what would happen when the transition period ended at 11pm on Thursday.
Spain's Foreign Minister Arancha Gonzalez Laya announced the "agreement in principle" means people in Gibraltar "can breathe a sigh of relief".

Further details will be published in the New Year, she added.
Prime Minister Boris Johnson said: "I wholeheartedly welcome today's political agreement between the UK and Spain on Gibraltar's future relationship with the EU.
“The UK has always been, and will remain, totally committed to the protection of the interests of Gibraltar and its British sovereignty."
Spanish PM Pedro Sanchez tweeted: "We have begun a new stage.
“We have reached a principle of agreement with the United Kingdom on Gibraltar that will allow us to remove barriers and move towards an area of shared prosperity.
"Firmness in principles, progress for citizenship.
"Thank you to the foreign negotiators."
Foreign Secretary Dominic Raab said: "All sides are committed to mitigating the effects of the end of the transition period on Gibraltar, and in particular ensure border fluidity, which is clearly in the best interests of the people living on both sides.
"We remain steadfast in our support for Gibraltar and its sovereignty.”
Gibraltar was given to Britain under the 1713 Treaty of Utrecht and is a key strategic port, with the Strait of Gibraltar providing the western entrance to the Mediterranean.