It’s been flying the British flag for longer than America has been independent. So why is The Rock suddenly at the centre of a rapidly escalating diplomatic row with Spain?
Spain ceded Gibraltar to the British crown in perpetuity under the 1713 Treaty of Utrecht after it had fallen into British hands during the War of the Spanish Succession.
The tiny 2.6 square mile territory, which lies on the north side of the strait that separates Europe and North Africa, has always had enormous strategic significance.
The Rock of Gibraltar became a key naval base in World War Two, helping to prevent German U-boats from slipping into the Mediterranean from the Atlantic.
Successive post-war Spanish governments have attempted to regain sovereignty over Gibraltar. The Fascist dictator General Franco closed the land frontier in 1969 and stopped flights and ferry services. The border with Spain did not reopen until 1985.
In 2002 a referendum was held asking Gibraltarians whether they would agree to shared Spanish and British sovereignty. The turnout was 87.9 per cent and nearly 99 per cent of people voted “no”.
Since then, British governments have said they will never negotiate on a change in sovereignty without the agreement of the government of Gibraltar and it’s 30,000 inhabitants.
Gibraltar remains a British Overseas Territory, ruled by an elected parliament, with the Queen represented by a governor. As with other overseas territories, the local government defers to London on matters of defence and foreign policy.
Britain claims Gibraltar’s territorial waters extend three nautical miles from the rock, with the option of extending it to 12 miles, according to the UN Convention on the Law of the Sea.
Spain says that, since territorial waters were not defined in the Treaty of Utrecht, its vessels can go where they want off the coast of Gibraltar.
The government of Gibraltar has complained that Spanish fishing boats have exhausted stocks of fish in the area by using bottom trawling, one of the “excessive and destructive fishing practices” Greenpeace accused the Spanish government of encouraging in a 2010 report.
The fishermen are often accompanied by boats from Spain’s Guardia Civil police force.
Last year the Foreign Office said there had been 176 “unlawful incursions into British Gibraltar Territorial Waters by Spanish state vessels” in the six months from 1 November 2012 to 30 April 2013.
Navy vessels always challenge Guardia Civil boats and Britain makes formal complaints to Madrid when it finds Spanish ships in “British” waters.
Last month the Europe Minister, David Lidington, complained to the Spanish government after shots were apparently fired from a Guardia Civil boat off Gibraltar at a jet skier.
Despite YouTube footage that appeared to feature the sound of shots, Spain denied the incident had taken place.
The diplomatic stand-off has been going on for years, but last month Gibraltar raised the stakes by dropping 70 concrete blocks into the sea.
The idea is supposedly to create an artificial reef to encourage biodiversity, but Spain sees the move as an attempt to stop its fishing fleet from trawling off the Rock.
The concrete reef appears to have triggered the recent crisis, but critics have accused the beleaguered government of centre-right prime minister Mariano Rajoy of using the Gibraltar dispute to distract voters from Spain’s domestic woes.
Mr Rajoy is fighting allegations of corruption while trying to turn around the economy in Spain, where unemployment is running at 26 per cent.
His regime has taken a harder line on Gibraltar than the previous socialist government, with foreign Minister Jose Manuel Garcia-Margallo saying “playtime is over”.
Spanish threats to charge fees for people crossing the border and take a closer look at tax breaks offered by the territory reflect long-standing concerns.
Low tobacco prices in Gibraltar mean low-level cross-border smuggling has long been an annoyance for the Spanish authorities, but seizures rose to record levels after the financial crisis in a trend widely linked to rising unemployment in Spain.
Gibraltar has also had a long-term reputation as a tax haven, but has recently rebranded itself as an international finance centre.
That means that taxes have stayed low – companies only pay 10 per cent and there is no VAT, capital gains or inheritance tax – but the government takes pains to comply with international standards on tax evasion and money laundering.
Low taxes are part of the reason why many leading onling gambling companies are based in Gibraltar.
Mr Garcia-Margallo has hinted that Spain is considering looking at collecting higher taxes from Gibraltar gaming companies that operate in Spain.
Local Spanish people may take issue with punitive measures like this. Gemma Araujo, the mayor of the border town La Linea, has said taxing people who go in and out of Gibraltar and targeting gambling revenue would be “inappropriate”.
Up to 10,000 Spaniards cross the border into Gibraltar each day to work in the territory, where unemployment is almost unknown.
Gibraltar’s chief minister, Fabian Picardo, said: “Spain has always linked Argentina’s claims on the Falklands with its own position on Gibraltar. Both nations are in economic dire straits and frequently attempt to boost each other’s claims.”
Spain support’s Argentina’s claim to Britain’s South Atlantic overseas territories. Both countries rely on a similar argument to claim sovereignty, saying Gibraltar and the Falklands are both colonies and the residents are settlers are no right to decided the territories’ future.
It was reported this week that Spain has sold 20 Mirage fighter jets to Argentina.