Gibraltar can officially call itself a city, 180 years after it was first granted the status by Queen Victoria.
The British overseas territory had bid to become a city earlier this year as part of the Queen's Platinum Jubilee.
But when researchers looked through the National Archives, they found it had already been recognised as one in 1842.
The Rock has now had its status reaffirmed - Boris Johnson described it as a "huge accolade" celebrating its "rich history and dynamism".
Gibraltar has been a British overseas territory since 1713, when it was ceded to Britain under a peace treaty signed following the War of the Spanish Succession.
A Jubilee competition saw 39 places apply to become cities and eight of them, including Doncaster, Bangor, and Dunfermline, ultimately granted the status.
City status is often associated with having a cathedral, university, or large population, but there are no set rules for it being granted - it's awarded by the monarch on advice of ministers.
It brings little in the way of material benefits, although it can often provide a boost to communities by putting them on the map and is normally a source of pride for residents.
The government said Gibraltar had been omitted from official lists after being originally given the title by Queen Victoria, but it is not clear how this happened.
An updated record of the 81 places named as cities has now been published.
Gibraltar is one of only five outside the UK to be recognised. Hamilton in Bermuda, Jamestown in Saint Helena, and Douglas on the Isle of Man were already on the list, while Stanley in the Falklands Islands was among those named for the Jubilee this year.
Southend in Essex was also granted city status earlier this year following the murder of David Amess MP, who had represented the Southend West constituency since 1997 and had long campaigned on the issue.
Cabinet Office Minister Kit Malthouse said: "The cities in this list are incredibly rich with history and culture, and the local people of those areas are rightly very proud to see their city's significance put to paper.
"I'm hopeful people based in these places, particularly the new cities, can reap the benefits of their home's increased global standing and that it will attract more inward investment for local businesses."
- TRANSFER TRAGEDY: How did Emiliano Sala end up on that plane?
- WATCHING PAINT DRY: Does more expensive paint actually offer a better finish?