Gibraltar: The story behind the UK's row with Spain
The Rock has hit the headlines this week, but what's the history behind it and why is it part of Britain?
A controversial draft of a European Council document on Friday has thrown the Rock of Gibraltar into the spotlight in recent days.
In it, EU officials appeared to suggest Spain would have a veto on whether negotiations related to Brexit would apply to Gibraltar, reigniting a territorial dispute between Britain and Spain that dates back to the 1700s.
But what is the history behind Gibraltar and why are London and Madrid arguing?
Where is Gibraltar?
This small outcrop of land lies off the southern tip of the Iberian peninsula on Spain's south coast. It covers just 2.6sq-miles and is dominated by a 1,398ft-high limestone ridge – "The Rock". It was first settled by the Moroccan Muslim berbers in the 12th century and changed hands numerous times over the next few centuries, until Spanish forces captured it in 1462.
Beginnings of British rule
Gibraltar's location makes it a gateway to the Mediterranean from the Atlantic Ocean, consequently its strategic military importance far exceeds its size.
In 1704, Anglo-Dutch forces captured the Rock during the War of the Spanish Succession and all control of it was handed to the British in the Treaty of Utrecht. Spain relinquished any claim over the territory in 1713.
A clause in the treaty states that if Britain ever surrenders control of Gibraltar, sovereignty will be handed back to Madrid.
In 1779, during the American Revolutionary War, Spain and France besieged Gibraltar for almost four years in an unsuccessful attempt to reclaim it. Britain's subsequent grip on the territory strengthened and Gibraltar was declared a crown colony on 25 June 1830.
Into the 20th century
In 1967, Gibraltar held a referendum on whether residents wished for British rule to continue or to be handed over to Spain. The result was a landslide - 99.64 per cent chose to remain under the UK flag.
Two years later, the UK formalised an official constitution for Gibraltar, handing autonomous self-government to the territory.
In response, Spain, then under the rule of General Francisco Franco, withdrew its workforce and closed the border with Gibraltar. It wasn't officially reopened until 1985, despite Gibraltarians being awarded British citizenship in 1981.
Diplomatic relations between the two have been fraught with constant tension since then.
A second referendum was held in 2002, after foreign secretary Jack Straw proposed the UK share jurisdiction over Gibraltar with Spain, and again 99 per cent voted to stay with London.
Spain has continued to issue formal pleas for joint sovereignty, calling for it on the day of the Brexit referendum and again last October.
What about Brexit?
Gibraltar might have voted to remain part of the UK, but it also voted overwhelmingly to remain in the EU.
The Rock has its own government, its own tax system, its own currency and its own legal system, while 60 per cent of its law is based on EU legislation, writes David Allen Green in the Financial Times.
Every political party and all the politicians in Gibraltar's parliament voted Remain and only four per cent of residents voted Leave – the subsequent Brexit victory has placed the Rock in a hard place.