Gibraltar (//; Spanish pronunciation: ) is a British Overseas Territory located at the southern tip of the Iberian Peninsula. It has an area of 6.7 km2 (2.6 sq mi) and is bordered to the north by Spain. The landscape is dominated by the Rock of Gibraltar at the foot of which is a densely populated city area, home to over 30,000 people, primarily Gibraltarians.
In 1704, Anglo-Dutch forces captured Gibraltar from Spain during the War of the Spanish Succession on behalf of the Habsburg claim to the Spanish throne. The territory was ceded to Great Britain in perpetuity under the Treaty of Utrecht in 1713. During World War II it was an important base for the Royal Navy as it controlled the entrance and exit to the Mediterranean Sea, which is only 8 miles (13 km) wide at this naval "choke point". It remains strategically important to this day, with half the world's seaborne trade passing through the strait. Today Gibraltar's economy is based largely on tourism, online gambling, financial services and cargo ship refuelling.
The sovereignty of Gibraltar is a major point of contention in Anglo-Spanish relations as Spain asserts a claim to the territory. Gibraltarians overwhelmingly rejected proposals for Spanish sovereignty in the 1967 referendum, and the idea of shared sovereignty in 2002. Under the Gibraltar constitution of 2006, Gibraltar governs its own affairs, though some powers, such as defence and foreign relations, remain the responsibility of the British government.
The Phoenicians inhabited Gibraltar around 950 BC. Subsequently, Gibraltar became known as one of the Pillars of Hercules, after the Greek legend of the creation of the Strait of Gibraltar by Heracles. The Carthaginians and Romans also established semi-permanent settlements. After the collapse of the Roman Empire, Gibraltar came briefly under the control of the Vandals, who crossed into Africa at the invitation of Boniface, the Count (or commander) of the territory. In prehistory evidence of Neanderthal habitation in Gibraltar has been discovered at Gorham's Cave.