page_title: History of Gibraltar
section_title: Barbary pirate raids and wars with other European powers
hierarchical_section_title: History of Gibraltar / Castilian and Spanish rule (1462–1704) / Barbary pirate raids and wars with other European powers
caption_attribution_description: English: Charles V Wall, Gibraltar.
context_page_description: The history of Gibraltar, a small peninsula on the southern Iberian coast near the entrance of the Mediterranean Sea, spans over 2,900 years. The peninsula has evolved from a place of reverence in ancient times into "one of the most densely fortified and fought-over places in Europe", as one historian has put it. Gibraltar's location has given it an outsized significance in the history of Europe and its fortified town, established in medieval times, has hosted garrisons that sustained numerous sieges and battles over the centuries.
  Gibraltar was first inhabited over 50,000 years ago by Neanderthals and may have been one of their last places of habitation before they died out around 24,000 years ago. Gibraltar's recorded history began around 950 BC with the Phoenicians, who lived nearby. The Carthaginians and Romans later worshipped Hercules in shrines said to have been built on the Rock of Gibraltar, which they called Mons Calpe, the "Hollow Mountain", and which they regarded as one of the twin Pillars of Hercules.
  Gibraltar became part of the Visigothic Kingdom of Hispania following the collapse of the Roman Empire and came under Muslim Moorish rule in 711 AD.
context_section_description: Despite continuing external threats Gibraltar was neglected by the Spanish crown and its fortifications fell into disrepair. Barbary pirates from North Africa took advantage of the weak defences in September 1540 by mounting a major raid in which hundreds of Gibraltar's residents were taken as hostages or slaves. The Shrine of Our Lady of Europe was sacked and all its valuables were stolen. Many of the captives were subsequently released when a Spanish fleet commanded by Bernardino de Mendoza intercepted the pirate ships near Alborán as they were bringing ransomed hostages back to Gibraltar. The Spanish crown belatedly responded to Gibraltar's vulnerability by building the Charles V Wall to control the southern flank of the Rock and commissioning the Italian engineer Giovanni Battista Calvi to strengthen other parts of the fortifications.
  The seas around Gibraltar continued to be dangerous for decades to come as Barbary pirate raids continued; although a small squadron of Spanish galleys was based at the port to counter pirate raids, it proved to be of limited effectiveness and many inhabitants were abducted and sold into slavery by the pirates. The problem worsened significantly after 1606, when Spain expelled the Moriscos;– Muslims who had converted to Christianity. Many of the expellees were evacuated to North Africa via Gibraltar but ended up joining the pirate fleets, either as Christian slaves or reconverted Muslims, and raided as far afield as Cornwall.
  The threat of the Barbary pirates was soon joined by that of Spain's enemies in northern Europe. On 5 May 1607, during the Eighty Years' War, a Dutch fleet under Admiral Jacob van Heemskerk ambushed a Spanish fleet at anchor in the Bay of Gibraltar. The Dutch won an overwhelming victory in the Battle of Gibraltar, losing no ships and very few men while the entire Spanish fleet was destroyed with the loss of 3,000 men. The Spanish and Dutch declared a temporary truce in 1609 (the Twelve Years' Truce) and resumed hostilities in 1621, when a joint Dutch and Danish fleet arrived in the Strait to attack Spanish shipping. This time the Spanish succeeded in capturing and sinking a number of the attackers' ships in the Battle of Gibraltar, driving away the rest.
  An English military presence was briefly established at Gibraltar for the first time in 1620. The Spanish granted permission for the English fleet to use Gibraltar's port as a base for operations against the Barbary pirates, who were raiding the British and Irish coasts. Some in England had ambitions to turn the fleet against Spain rather than the Barbary coast. However, James I successfully resisted Parliamentary pressure to declare war on Spain and the fleet returned to England. After Charles I ascended the throne in 1625, a second English fleet was sent to the region with instructions to "take or spoil a town" on the Spanish coast. Gibraltar was one of the proposed targets on the basis that it was small, could easily be garrisoned, supplied and defended, and was in a highly strategic location. The English fleet instead attacked Cádiz in the belief that its sacking would be more immediately profitable, but the raid turned into a fiasco. The landing force looted the town's wine stores and was evacuated after four days of mass drunkenness without anything useful having been achieved.
  The presence of Spain's enemies in the Straits prompted the Spanish king Philip IV to order Gibraltar's defences to be strengthened. A new mole and gun platforms were built, though the latter's usefulness was limited due to a lack of gunners. The town was an unsanitary, crowded place, which probably contributed to the outbreak in 1649 of an epidemic – reportedly plague but possibly typhoid – which killed a quarter of the population. English fleets returned to Gibraltar in 1651–52 and again in 1654–55 as temporary allies of the Spanish against French and Dutch shipping in the Straits.
  In 1654, Oliver Cromwell decided to turn on Spain (which had been the first state to recognise the Commonwealth of England) and seize the island of Hispan
caption: Charles V Wall, built by the Spanish to control access to the south side of Gibraltar after the pirate raid of September 1540
exif: {"Image Make": "Konica Corporation", "Image Model": "Konica Digital Camera KD-500Z", "Image Orientation": "Horizontal (normal)", "Image XResolution": "72", "Image YResolution": "72", "Image ResolutionUnit": "Pixels/Inch", "Image Software": "Adobe Photoshop CS Windows", "Image DateTime": "2007:06:13 01:27:02", "Image YCbCrPositioning": "Centered", "Image ExifOffset": "248", "Thumbnail Compression": "JPEG (old-style)", "Thumbnail XResolution": "72", "Thumbnail YResolution": "72", "Thumbnail ResolutionUnit": "Pixels/Inch", "Thumbnail JPEGInterchangeFormat": "858", "Thumbnail JPEGInterchangeFormatLength": "7778", "EXIF ExposureTime": "21/5000", "EXIF FNumber": "47/10", "EXIF ISOSpeedRatings": "100", "EXIF ExifVersion": "0220", "EXIF DateTimeOriginal": "2007:05:17 08:50:56", "EXIF DateTimeDigitized": "2007:05:17 08:50:56", "EXIF ComponentsConfiguration": "YCbCr", "EXIF CompressedBitsPerPixel": "17/5", "EXIF BrightnessValue": "37/5", "EXIF ExposureBiasValue": "0", "EXIF MaxApertureValue": "3", "EXIF MeteringMode": "CenterWeightedAverage", "EXIF LightSource": "Unknown", "EXIF Flash": "Flash did not fire, compulsory flash mode", "EXIF FocalLength": "8", "EXIF FlashPixVersion": "0100", "EXIF ColorSpace": "sRGB", "EXIF ExifImageWidth": "1600", "EXIF ExifImageLength": "1200", "Interoperability InteroperabilityIndex": "R98", "Interoperability InteroperabilityVersion": "[48, 49, 48, 48]", "EXIF InteroperabilityOffset": "732", "EXIF CustomRendered": "Normal", "EXIF ExposureMode": "Auto Exposure", "EXIF WhiteBalance": "Auto", "EXIF DigitalZoomRatio": "0", "EXIF FocalLengthIn35mmFilm": "39", "EXIF SceneCaptureType": "Standard", "EXIF GainControl": "None", "EXIF Contrast": "Normal", "EXIF Saturation": "Normal", "EXIF Sharpness": "Normal", "EXIF SubjectDistanceRange": "0"}