There have been fourteen recorded sieges of Gibraltar. Although the peninsula of Gibraltar is only 6 kilometres (3.7 mi) long and 1 kilometre (0.62 mi) wide, it occupies an extremely strategic location on the southern Iberian coast at the western entrance to the Mediterranean Sea. Its position just across the eponymous Strait from Morocco in North Africa, as well as its natural defensibility, have made it one of the most fought-over places in Europe.
Only five of the sieges resulted in a change of rule. Seven were fought between Muslims and Catholics during Muslim rule, four between Spain and Britain from the Anglo-Dutch capture in 1704 to the end of the Great Siege in 1783, two between rival Catholic factions, and one between rival Muslim powers. Four of Gibraltar's changes in rule, including three sieges, took place over a matter of days or hours, whereas several other sieges had durations of months or years and claimed the lives of thousands without resulting in any change in rule.