You are awakened by the sound of gunfire. You stumble outside to a night sky filled with the suffocating smell of smoke. More gunshots ring out in the distance, as a harmony of pained, panicked screams swells all around. You look off towards the horizon, and that is when you see it: unfamiliar ships line the shore of your coastal town. These ships, as it turns out, brought with them a veritable brigade of bloodthirsty buccaneers, armed to the teeth with cutlasses and flintlock pistols. Pirates are coursing through the streets of your once-peaceful community, burning homes and taking whatever loot they may find for themselves. The veil of nighttime darkness that hangs over the city is dotted by the orange glow of torches and burning buildings. Flashes of exploding gunpowder light up the coastline, as cannonballs fired indiscriminately from the ships rip apart cathedrals, homes, and whatever unfortunate souls that may find themselves in the line of fire. Surviving the night is no guarantor of safety, either; the raid may go on for days, and even when it ends, another one may be just around the corner.
This is a scenario one might expect in places like Port Royal, Havana, Tortuga, or Nassau. Less likely to come to mind, however, is Mexico, yet this was a brutal reality for the people of San Francisco de Campeche; they lived under the fearsome, looming threat of pirate raids for centuries. Situated in the Bay of Campeche, the so-called “rainbow city” serves as the capital of the Mexican state of the same name. A designated UNESCO World Heritage Site along the old Spanish Main, Campeche was a major hub of maritime activity for most of its history; as such, pirates and buccaneers were drawn to it like moths to a flame.
The earliest recorded pirate activity in the Bay of Campeche dates back to the late-1550s, and it has its roots in one of the region’s most precious natural resources: logwood. The logwood trees of Campeche were a coveted commodity; the British, in particular, sought logwood because it was helpful in dyeing wool, the empire’s most prominent global export.  In 1558, a group of English pirates seeking to harvest logwood would set up camp in Laguna de Términos, some 125 miles south of Campeche City. The following year, the attacks began, as French ships started capturing women and holding them for ransom. In August 1561, three ships carrying some 30 pirates came to port in Campeche; after a spree of burning and looting, Spanish reinforcements arrived, killed 15, captured five, and recovered the property that was stolen. Then, in September 1597, the people of Campeche were betrayed by one of their own. A group of pirates, led by one William Parker, were guided to the city in secret by Juan Venturarte, a Campechano local, at which point a brief but bloody battle with armed civilians erupted. Parker and his men retreated, and for Venturarte’s troubles, he “was executed as a traitor by having pieces of his flesh ripped out with a hot iron.” 
The closing of the 16th century would not, unfortunately, signify a closing to the pirate-laden chapter of Campeche’s history. It was quite the contrary; the 17th century would see the most consistent – and destructive – pirate activity in the region’s history. In the same century, San Francisco de Campeche (also known as “Campeachy” to the English) would start taking measures to protect itself via fortifications, though progress proved to be slow. In 1610, provincial governor Carlos de Lima y Arellano declared that a fortress be constructed – the first of its kind in Campeche.  Some 22 years later, a pirate known as Diego the Mulatto would initiate his first strike on Campeche, sacking the city with ten ships and a multinational crew consisting of buccaneers from Portugal, England, and Holland.  He would return four years later, this time attacking a vessel off the coast.
It was in the latter half of the 17th century that Campeche would see its most brutal pirate incursions. The first came in February 1663, when – in an effort to alleviate the difficulties English logwood cutters were having shipping their goods to Jamaica – corsair Christopher Myngs and his deputy, the Dutch pirate Edward Mansvelt, opted to launch yet another attack on the city. Though his forces initially numbered some 1,500, only about 1,000 of them would make it to shore. Even with their depleted forces, Myngs and company were able to seize the town in less than an hour, though it came at a cost. Myngs was seriously wounded in the fighting, and after being taken back to his flagship for treatment, he ceded control to Mansvelt. It was Mansvelt who would negotiate a surrender with Governor Antonio Maldonado de Aldana. After 15 days in Campeche, Myngs and Mansvelt sailed back to Jamaica with 14 seized vessels. 
Logwood, captured ships, and local goods were not the only things to which pirates laid claim. That extended to the people of Campeche, as well. The abduction of women for ransom in 1559 was not the only incident of Campechano/a civilians being taken from their homes. A July 1678 attack by George Spurre and John Neville resulted in the capture of some 250 civilians, most of which were Native Mayas; most of them were promptly taken to “Laguna de Términos, where about twenty men and sixty to seventy women, along with many children, were sold into slavery.”  In 1685, British Buccaneer Bartholomew Sharp would do the same, capturing Mayas from Campeche and selling them in Bermuda with the permission of the governor. 
The most notorious pirate to ever torment the people of Campeche was the Dutchman, Laurens de Graaf (also known as Lorencillo). The closest thing Campeche would have to a recurring foe, de Graaf would first make his presence known to the city in 1672, when he torched two frigates that were under construction.  This would prove to be a mere preamble to the hell that he would rain down on the city a little over a decade later. In August of 1685 – the same year that Bartholomew Sharp abducted local Mayas and sold them into slavery – Lorencillo arrived in Campeche alongside fellow pirate, Michel de Grammont, at which point their crews overthrew the city’s defenses and captured some 300 civilians. After being held back en route to Mérida, de Graaf returned to Campeche and executed nine prisoners in the town square, while he and de Grammont’s men tortured many more. The corsairs would remain in the city until September, when they locked the remaining prisoners in boat hulls, sent them to sea, and bombarded them with cannon fire. 
The aforementioned attempts at fortification did almost nothing to prevent the pirate onslaughts that afflicted the city for so many years. In 1672, King Charles II approved the construction of fortifications, but it was not until 1680 that Martín de la Torre, a military engineer, would come forward with a final design for the undertaking: an irregularly-shaped hexagonal wall surrounding the city. The project began in 1684, but stalled due to a shortage of funds – just in time for Laurens de Graaf to launch his infamous attack unimpeded.  In fact, it was de Graaf’s attack that would prompt a resurgence in construction, which resumed in 1686. By 1704, the project was completed. 
By this time, though, pirate activity in the Bay of Campeche had already peaked. There was the odd incursion here or there (including a small-scale, inconsequential encounter with Blackbeard), and a ship would be seized on occasion.  So intertwined was piracy with Campeche that the fledgling U.S. government felt its impact in various capacities. In 1792, Thomas Jefferson wrote to George Washington about establishing a commercial treaty with Spain; in this letter, he outlined his desire to mitigate piracy in the gulf.  In three separate letters from James Madison, he notes the seizure of three ships in the Bay of Campeche.  Clearly, piracy – and its lasting impacts – had not entirely left Campeche, but the days of men going to the market so their wives would not be abducted in a random pirate attack had more or less come to an end. 
Piracy is not gone from Campeche. This history of piracy is baked into the city’s DNA. From cuisines to museums, piracy is a staple of its identity; after all, the city’s baseball team is called the Piratas de Campeche, the logo of which is a snarling baseball with an eyepatch and an archetypal red bandana atop its head. Even the city’s architecture – some of its walls are still standing, even today – stands as a stark reminder of its battles against the scourges of the sea.