A chronology of key events:
711 - Gibraltar captured by Muslim commander Tariq Ibn-Ziyad.
The Rock surveys Gibraltar's harbour
Height: 1,396 feet (426 metres)
Composed of limestone and shale
1462 - Spain recovers Gibraltar from the Moors.
1501 - Isabella I, queen of Castile and Aragon, annexes Gibraltar to Spain.
1704 - The English capture Gibraltar during War of Spanish Succession.
1713 - Under the Treaty of Utrecht Gibraltar is formally ceded to Britain by Spain.
1830 - Gibraltar becomes a British crown colony.
1963 - Spanish government begins a campaign through the United Nations Special Committee on Decolonisation for the handover of Gibraltar to Spain.
1967 - Referendum: Residents vote resoundingly in favour of continued British sovereignty.
1969 - A new constitution for Gibraltar is introduced by Britain. This reaffirms Gibraltar's link with Britain and grants full internal self-government to Gibraltar. Spain closes its border with Gibraltar, withdraws its labour force and cuts transport and communication links.
1973 - Gibraltar joins the European Economic Community alongside Britain.
1981 - Gibraltarians granted full British citizenship.
1984 - Under the terms of the Brussels Process, both sides agree to try and resolve differences over the Rock. British and Spanish governments agree to provide equal rights for Spaniards in Gibraltar and for Gibraltarians in Spain. Free travel between Spain and Gibraltar is restored.
1985 - Spain lifts border blockade. Negotiations over the future of Gibraltar continue.
2002 - Unofficial referendum shows that almost 99% of Gibraltarians are against joint British-Spanish sovereignty. Britain reaffirms that no decision on the future of Gibraltar will be made without the consent of Gibraltarians.
2003 November - For 13 hours, Spain closes its border with Gibraltar for the first time since 1969 when a British cruise liner docks carrying passengers infected with a virus. Britain and Gibraltar say Spain's action is "unnecessary and disproportionate".
2004 August - Gibraltar marks 300 years of British rule. Visit by British Defence Secretary Geoff Hoon is criticised by Madrid as being insensitive.
2004 December - Britain and Spain agree to allow Gibraltar to represent itself in a new forum on the territory's future.
Sunrise over Gibraltar
2006 September - Ministers from Britain, Spain and Gibraltar sign a landmark agreement under which border controls are eased and flights from Spain are allowed to use Gibraltar's airport. The deal makes no mention of sovereignty.
2006 November - Voters in a referendum back proposals to devolve more powers from London to Gibraltar.
2006 December - Passenger flights between Gibraltar and Spain begin.
2009 July - Spanish Foreign Minister Miguel Angel Moratinos holds talks in Gibraltar with his UK counterpart David Miliband - the first visit by a Spanish minister for 30 years.
2010 July - Gibraltar announces it is ending tax-free offshore status for companies based on its territory in January 2011.