Gibraltar is a British Overseas Territory located on the southern end of the Iberian Peninsula at the entrance of the Mediterranean. It has an area of 2.6 square miles (6.7 km2) and a northern border with the Province of Cádiz in Andalusia, Spain. The Rock of Gibraltar is the only landmark of the region. At its foot is the densely populated city area, home to almost 30,000 Gibraltarians and other nationalities.
An Anglo-Dutch force captured Gibraltar from Spain in 1704 during the War of the Spanish Succession on behalf of the Habsburg pretender to the Spanish throne. The territory was subsequently ceded to Britain "in perpetuity" under the Treaty of Utrecht in 1713. It was an important base for the Royal Navy; today its economy is based largely on tourism, online gaming, financial services, and shipping.
The sovereignty of Gibraltar is a major point of contention in Anglo-Spanish relations as Spain asserts a claim to the territory. Gibraltarians rejected proposals for Spanish sovereignty in a 1967 referendum and again 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 UK Government.