While such raids had occurred since soon after the Muslim conquest of the region, the terms "Barbary pirates" and "Barbary corsairs" are normally applied to the raiders active from the 16th century onwards, when the frequency and range of the slavers' attacks increased. In that period Algiers, Tunis and Tripoli came under the sovereignty of the Ottoman Empire, either as directly administered provinces or as autonomous dependencies known as the Barbary States. Similar raids were undertaken from Salé and other ports in Morocco.

Corsairs captured thousands of ships and repeatedly raided coastal towns. As a result, residents abandoned their former villages of long stretches of coast in Spain and Italy. The raids were such a problem coastal settlements were seldom undertaken until the 19th century. From the 16th to 19th century, corsairs captured an estimated 800,000 to 1.25 million people as slaves.[2] Some corsairs were European outcasts and converts such as John Ward and Zymen Danseker.[3]Hayreddin Barbarossa and Oruç Reis, Turkish Barbarossa Brothers, who took control of Algiers on behalf of the Ottomans in the early 16th century, were also notorious corsairs. The European pirates brought advanced sailing and shipbuilding techniques to the Barbary Coast around 1600, which enabled the corsairs to extend their activities into the Atlantic Ocean.[3] The effects of the Barbary raids peaked in the early to mid-17th century.

The scope of corsair activity began to diminish in the latter part of the 17th century, as the more powerful European navies started to compel the Barbary States to make peace and cease attacking their shipping. However, the ships and coasts of Christian states without such effective protection continued to suffer until the early 19th century. Following the Napoleonic Wars and the Congress of Vienna in 1814–15, European powers agreed upon the need to suppress the Barbary corsairs entirely and the threat was largely subdued. Occasional incidents occurred, including two Barbary wars between the United States of America and the Barbary States, until finally terminated by the French conquest of Algiers in 1830.

Piracy by Muslim populations had been known in the Mediterranean since at least the 9th century and the short-lived Emirate of Crete. The Provence was plagued by Saracen slave raids in the Carolingian era; in 869, archbishop Rotlandus of Arles was captured, and died before he could be released after the payment of a ransom in weapons, treasure and slaves. The level of Muslim pirate activity was relatively low[citation needed], but in the 13th and 14th centuries pirates from Christian states, particularly Catalonia, were a constant threat to merchants who traded by sea.[citation needed]

In 1198 the problem of Berber piracy and slave-taking was so great that a religious order, the Trinitarians were founded to collect ransoms and even to exchange themselves as ransom for those captured and pressed into slavery in North Africa. In the 14th century Tunisian corsairs became enough of a threat to provoke a Franco-Genoese attack on Mahdia in 1390, also known as the "Barbary Crusade". Morisco exiles of the Reconquista and Maghreb pirates added to the numbers, but it was not until the expansion of the Ottoman Empire and the arrival of the privateer and admiral Kemal Reis in 1487 that the Barbary corsairs became a true menace to shipping from European Christian nations.[4]

British captain witnessing the miseries of Christian slaves in Algiers, 1815

The Barbary pirates had long attacked English and other European shipping along the North Coast of Africa. They had been attacking English merchant and passengers ships since the 1600s. Regular fundraising for ransoms was undertaken generally by families and local church groups, who generally raised the ransoms for individuals. The government did not ransom ordinary persons. The English became familiar with captivity narratives written by Barbary pirates' prisoners and ransomed captives, as so many people were taken. After English colonists began to go to North America and be taken captive by Native Americans, both the colonists and people in England had some basis for considering the meaning of captivity for a Christian in an alien society.[5]

As late as 1798, an islet near Sardinia was attacked by the Tunisians, and more than 900 inhabitants were taken away as slaves.[9] Throughout history, geography was on the pirates' side on the Northern coast of Africa. The coast was ideal for their wants and needs. With natural harbours often backed by lagoons, it provided a haven for guerrilla warfare, such as attacks on shipping vessels venturing through their territory. On the coast, mountainous areas provided ample reconnaissance for the corsairs as well. Ships were spotted from afar; the pirates had time to prepare their attacks and surprise the ships.

Spanish Moors and Turkish adventurers from the Levant, of whom the most successful were Hızır and Oruç, natives of Mitylene, increased the number of raids around the turn of the 15th century. In response, Spain began to conquer the coastal towns of Oran, Algiers and Tunis. But after Oruç was killed in battle with the Spanish in 1518, his brother Hızır appealed to Selim I, the Ottoman sultan, who sent him troops. In 1529, Hızır drove the Spaniards from the rocky, fortified island in front of Algiers, and founded the Ottoman power in the region. From about 1518 till the death of Uluç Ali in 1587, Algiers was the main seat of government of the beylerbeys of northern Africa, who ruled over Tripoli, Tunisia and Algeria. From 1587 to 1659, they were ruled by Ottoman pashas, sent from Constantinople to govern for three years; but in the latter year a military revolt in Algiers reduced the pashas to nonentities.

From 1659, these African cities, although nominally part of the Ottoman Empire, were in fact military republics that chose their own rulers and lived by war booty captured from the Spanish and Portuguese. There are several cases of Sephardic Jews, including Sinan Reis and Samuel Pallache, who upon fleeing Iberia turned to attacking the Spanish Empire's shipping under the Ottoman flag, a profitable strategy of revenge for the Inquisition's religious persecution.[10][11]

During the first period (1518–1587), the beylerbeys were admirals of the sultan, commanding great fleets and conducting war operations for political ends. They were slave-hunters and their methods were ferocious. After 1587, the sole object of their successors became plunder, on land and sea. The maritime operations were conducted by the captains, or reises, who formed a class or even a corporation. Cruisers were fitted out by investors and commanded by the reises. Ten percent of the value of the prizes was paid to the pasha or his successors, who bore the titles of agha or dey or bey.[12]

The Barbary pirates frequently attacked Corsica, resulting in many Genoese towers being erected.

In 1544 Hayreddin captured the island of Ischia, taking 4,000 prisoners, and enslaved some 2,000-3,000 inhabitants of Lipari.[13] In 1551 Turgut Reis enslaved the entire population of the Maltese island of Gozo, between 5,000 and 6,000, sending them to Ottoman Tripolitania. In 1554 corsairs under Turgut Reis sacked Vieste, beheaded 5,000 of its inhabitants, and abducted another 6,000.[14] In 1555 Turgut Reis sacked Bastia, Corsica, taking 6,000 prisoners. In 1558, Barbary corsairs captured the town of Ciutadella (Minorca), destroyed it, murdered many inhabitants, and took 3,000 to Constantinople as slaves.[15] In 1563 Turgut Reis landed on the shores of the province of Granada, Spain, and captured coastal settlements in the area, such as Almuñécar, along with 4,000 prisoners. Barbary corsairs often attacked the Balearic Islands, and in response many coastal watchtowers and fortified churches were erected. The threat was so severe that residents abandoned the island of Formentera.

Even at this early stage, the European states fought back: Livorno's monument Quattro Mori celebrates 16th-century victories against the Barbary corsairs won by the Knights of Malta and the Order of Saint Stephen, of which the Grand Duke of Tuscany Ferdinando I de' Medici was Grand Master. Another response was the construction of the original frigates; light, fast and maneuverable galleys, designed to run down Barbary corsairs trying to get away with their loot and slaves. Other measures included coastal lookouts to give warning for people to withdraw into fortified places and rally local forces to fight the corsairs. This latter goal was especially difficult to achieve as the corsairs had the advantage of surprise; the vulnerable European Mediterranean coasts were very long and easily accessible from the north African Barbary bases, and the corsairs were careful in planning their raids.

During the first half of the 17th century, Barbary raiding was at its peak. This was due largely to the contribution of Dutch corsairs, notably Zymen Danseker (Simon de Danser), who used the Barbary ports as bases for attacking Spanish shipping during the Dutch Revolt. They cooperated with local raiders and introduced them to the latest Dutch sailing rigs, enabling them to brave Atlantic waters.[16] Some of these Dutch corsairs converted to Islam and settled permanently in North Africa. Two examples are Süleyman Reis, "De Veenboer", who became admiral of the Algerian corsair fleet in 1617, and his quartermaster Murat Reis, born Jan Janszoon. Both worked for the notorious Dutch corsair Zymen Danseker.

Occasionally coastal raids reached farther afield. Iceland was subject to raids in 1627. Jan Janszoon, (Murat Reis the Younger) is said to have taken 400 prisoners; 242 of the captives later were sold into slavery on the Barbary Coast. The corsairs took only young people and those in good physical condition. All those offering resistance were killed, and the old people were gathered into a church which was set on fire. Among those captured was Ólafur Egilsson, who was ransomed the next year. Upon returning to Iceland, he wrote an account about his experience. Such captivity narratives by Europeans who had been held in Muslim states eventually constituted a literary genre.

Ireland was subject to a similar attack. In June 1631 Murat Reis, with corsairs from Algiers and armed troops of the Ottoman Empire, stormed ashore at the little harbor village of Baltimore, County Cork. They captured almost all the villagers and took them away to a life of slavery in North Africa.[12] The prisoners were destined for a variety of fates — some lived out their days chained to the oars as galley slaves, while women spent long years as concubines in harems or within the walls of the sultan's palace. Only two of these captives ever returned to Ireland.[21][page needed]

More than 20,000 captives were said to be imprisoned in Algiers alone. The rich were often able to secure release through ransom, but the poor were condemned to slavery. Their masters would on occasion allow them to secure freedom by professing Islam. A long list might be given of people of good social position, not only Italians or Spaniards, but German or English travelers in the south, who were captives for a time.[12] While the chief victims were the inhabitants of the coasts of Sicily, Naples and Spain, all traders of nations which did not pay tribute for immunity or force the Barbary States to leave them alone were liable to be taken at sea. Religious orders — the Redemptorists and Lazarists — worked for the redemption of captives, and in many countries the wealthy left legacies to support such redemptions.

Barbary piracy thrived on the competition among European powers. France encouraged the corsairs against Spain, and later Britain and Holland supported them against France. By the second half of the 17th century, the greater European naval powers were able to strike back effectively enough to intimidate the Barbary States into making peace with them. However, those countries' commercial interests benefited by the pirates continuing attacks on their competitors. As a result, they did not cooperate to impose a more general cessation of corsair activity.

England was the most successful of the Christian states in dealing with the corsair threat.[citation needed] From the 1630s onwards England had signed peace treaties with the Barbary States on various occasions, but invariably breaches of these agreements led to renewed wars. A particular bone of contention was the tendency of foreign ships to pose as English to avoid attack. However, growing English naval power and increasingly persistent operations against the corsairs proved increasingly costly for the Barbary States. During the reign of Charles II a series of English expeditions won victories over raiding Barbary squadrons and mounted attacks on their home ports; these actions permanently ended the Barbary threat to English shipping. In 1675 a Royal Navy squadron led by Sir John Narborough negotiated a lasting peace with Tunis and, after bombarding the city to induce compliance, with Tripoli. Peace with Salé followed in 1676.

Algiers, the most powerful of the Barbary States, returned to war the following year, breaking a treaty made in 1671. After suffering defeats at the hands of an English squadron under Arthur Herbert, Algiers made peace again in 1682, in a treaty that lasted until 1816. France, which had recently emerged as a leading naval power, achieved comparable success soon afterwards. It bombarded Algiers in 1682, 1683 and 1688 to secure a lasting peace, and forced Tripoli to sue for peace by bombardment in 1686.

Piracy was enough of a problem that some states entered into the redemption business. In Denmark, "At the beginning of the 18th century money was collected systematically in all churches, and a so called ‘slave fund’ (slavekasse) was established by the state in 1715. Funds were brought in through a compulsory insurance sum for seafarers. 165 slaves were ransomed by this institution between 1716 and 1736."[22] "Between 1716 and 1754 19 ships from Denmark-Norway were captured with 208 men; piracy was thus a serious problem for the Danish merchant fleet."[22]

In the late 18th century piracy began to arise again. In 1783 and 1784 the Spanish bombarded Algiers to end piracy. The second timeAdmiral Barceló damaged the city so severely that the Algerian Dey asked Spain to negotiate a peace treaty. From then on Spanish vessels and coasts were safe for several years. Separately, the Danish attacked Tripoli in 1797.

Until the American Declaration of Independence in 1776, British treaties with the North African states protected American ships from the Barbary corsairs. Morocco, which in 1777 was the first independent nation to publicly recognize the United States, in 1784 became the first Barbary power to seize an American vessel after the nation achieved independence. The Barbary threat led directly to the United States founding the United States Navy in March 1794. While the United States did secure peace treaties with the Barbary states, it was obliged to pay tribute for protection from attack. The burden was substantial: in 1800 payments in ransom and tribute to the Barbary states amounted to 20% of United States federal government's annual expenditures.[23] The United States conducted the First Barbary War in 1801 and the Second Barbary War in 1815 to gain more favorable peace terms; it ended the payment of tribute. But, Algiers broke the 1805 peace treaty after two years, and refused to implement the 1815 treaty until compelled to do so by Britain in 1816.

The Congress of Vienna (1814–5), which ended the Napoleonic Wars, led to increased European consensus on the need to end Barbary raiding. The sacking of Palma on the island of Sardinia by a Tunisian squadron, which carried off 158 inhabitants, roused widespread indignation. Britain had by this time banned the slave trade and was seeking to induce other countries to do likewise. States that were more vulnerable to the corsairs complained that Britain cared more for ending the trade in African slaves than stopping the enslavement of Europeans and Americans by the Barbary States.

In order to neutralise this objection and further the anti-slavery campaign, in 1816 Britain sent Lord Exmouth to secure new concessions from Tripoli, Tunis, and Algiers, including a pledge to treat Christian captives in any future conflict as prisoners of war rather than slaves. He imposed peace between Algiers and the kingdoms of Sardinia and Sicily. On his first visit, Lord Exmouth negotiated satisfactory treaties and sailed for home. While he was negotiating, a number of Sardinian fishermen who had settled at Bona on the Tunisian coast were brutally treated without his knowledge. As Sardinians they were technically under British protection, and the government sent Exmouth back to secure reparation. On August 17, in combination with a Dutch squadron under Admiral Van de Capellen, Exmouth bombarded Algiers. Both Algiers and Tunis made fresh concessions as a result.

The Barbary states had difficulty securing uniform compliance with a total prohibition of slave-raiding, as this had been traditionally of central importance to the North African economy. Slavers continued to take captives by preying on less well-protected peoples. Algiers subsequently renewed its slave-raiding, though on a smaller scale. Europeans at the Congress of Aix-la-Chapelle in 1818 discussed possible retaliation. In 1820 a British fleet under Admiral Sir Harry Neal bombarded Algiers. Corsair activity based in Algiers did not entirely cease until France conquered the state in 1830.[12]

While Barbary corsairs looted the cargo of ships they captured, their primary goal was to capture people for sale as slaves or for ransom. Those who had family or friends who might ransom them were held captive but not obliged to work; the most famous of these was the author Miguel de Cervantes, who was held for almost five years. Others were sold into various types of servitude. Attractive women or boys could be used as sex slaves and was considered the original "fate worse than death". Captives who converted to Islam were generally freed, since enslavement of Muslims was prohibited; but this meant that they could never return to their native countries.[24][25]

Historian Robert C. Davis estimated that between 1530 and 1780, 1–1.25 million Europeans were captured and taken as slaves to North Africa, principally Algiers, Tunis, and Tripoli, but also Constantinople and Salé.[26]

Captives often suffered from privation on voyages to North Africa if taken at a distance. Those who survived the journeys were often forced to walk through town as they were taken to slave auctions. The slaves typically had to stand from eight in the morning until two in the afternoon while buyers viewed them.[citation needed] Next came the auction, where the townspeople would bid on the captives they wanted to purchase and once that was over, the governor of Algiers (the Dey) had the chance to purchase any slave he wanted for the price they were sold at the auction. During the auctions the slaves would be forced to run and jump around to show their strength and stamina. After purchase, the captives would either be held for ransom, or be put to work. Slaves were used for a wide variety of jobs, from hard manual labor to housework (the job assigned to most women slaves). At night the slaves were put into prisons called 'bagnios' (derived from the Italian word "bagno" for public bath, inspired by the Turks' use of Roman baths at Constantinople as prisons),[27] which were often hot and overcrowded. However, these bagnios began improving by the 18th century. Some bagnios had chapels, hospitals, shops, and bars run by captives, though such amenities remained uncommon.

Although the conditions in bagnios were harsh, they were better than those endured by galley slaves. Most Barbary galleys were at sea for around eighty to a hundred days a year, but when the slaves assigned to them were on land, they were forced to do hard manual labor. There were exceptions: "galley slaves of the Ottoman Sultan in Constantinople would be permanently confined to their galleys, and often served extremely long terms, averaging around nineteen years in the late seventeenth-century and early eighteenth-century periods. These slaves rarely got off the galley but lived there for years."[28] During this time, rowers were shackled and chained where they sat, and never allowed to leave. Sleeping (which was limited), eating, defecation and urination took place at the seat to which they were shackled. There were usually five or six rowers on each oar. Overseers would walk back and forth and whip slaves considered not to be working hard enough.

Barbary slaves could hope to be freed through payment of a ransom. Despite the efforts of middlemen and charities to raise money to provide ransoms, they were still very difficult to come by. As European communities increased their charity funding for ransoming slaves, North African states increased the amount of ransom required. Lack of money to pay a ransom was not the only problem. Persons taken captive needed to notify their families of their status and tell them the ransom price. Mail charges were often beyond the reach of ordinary captive slaves, and it could take several months for the mail to be delivered.

After payment of a ransom, slaves were often taken to a port to wait for the ransom to be finalized. In some cases in the 17th and 18th centuries, slaves were kept under quarantine due to fear of the plague threatening the life of the slave and payment of the ransom.

Not many Barbary slaves could depend on being ransomed by their communities. They had to be deemed worthy of it and many poor people were never ransomed. The tribute prices for the slaves usually varied based on their usefulness on a ship. So a ship master would cost more than a common seaman. Escaping was another possibility, but rarely successful; Cervantes, future author of Don Quijote, made four unsuccessful attempts to escape from slavery, and was eventually ransomed by his family. Thomas Pellow was a successful escaped slave who published his story in 1740. After several failed attempts, in which he was nearly killed, Pellow had finally escaped to Gibraltar in July 1738.

According to historian Adrian Tinniswood, the most notorious corsairs were English and European renegades who had learned their trade as privateers, and who moved to the Barbary Coast during peacetime to pursue their trade. These outcasts brought up-to-date naval expertise to the piracy business, and enabled the corsairs to make long-distance slave-catching raids as far away as Iceland and Newfoundland.[3] The English corsair Henry Mainwaring later returned to England after gaining a royal pardon. He was knighted, elected to Parliament, and appointed a vice admiral of the Royal Navy.[3]

The most famous of the corsairs in North Africa were brothers Oruç and Hızır Hayreddin. They, and two less well-known brothers, all became Barbary corsairs; they were called the Barbarossas (Italian for Redbeards) after the red beard of Oruç, the eldest. Oruç captured the island of Djerba for the Ottoman Empire in 1502 or 1503. He often attacked Spanish territories on the coast of North Africa; during one failed attempt in 1512 he lost his left arm to a cannonball. The eldest Barbarossa also went on a rampage through Algiers in 1516, and captured the town with the help of the Ottoman Empire. He executed the ruler of Algiers and everybody he suspected would oppose him, including local rulers. He was finally captured and killed by the Spanish in 1518, and put on display.

Oruç, based mainly on land, was not the best-known of the Barbarossas. His youngest brother Hızır (later called Hayreddin or Kheir ed-Din) was a more traditional corsair. He was a capable engineer and spoke at least six languages. He dyed the hair of his head and beard with henna to redden it like Oruç's. After capturing many crucial coastal areas, Hayreddin was appointed admiral-in-chief of the Ottoman sultan's fleet. Under his command the Ottoman Empire was able to gain and keep control of the eastern Mediterranean for over thirty years. Barbaros Hızır Hayreddin Pasha died in 1546 of a fever, possibly the plague.

English corsair Jack, or John, Ward was once called "beyond doubt the greatest scoundrel that ever sailed from England" by the English ambassador to Venice. Ward was a privateer for Queen Elizabeth during her war with Spain; after the end of the war, he became a corsair. With some associates he captured a ship in about 1603 and sailed it to Tunis; he and his crew converted to Islam. He was successful and became rich. He introduced heavily armed square-rigged ships, used instead of galleys, to the North African area, a major reason for the Barbary's future dominance of the Mediterranean. He died of plague in 1622.

Sayyida al-Hurra was a female Muslim cleric, merchant, governor of Tétouan, and later queen of Morocco.[29][30] She was born around 1485 in the Emirate of Granada, but was forced to flee to Morocco when she was very young to escape the Reconquista. In Morocco, she gathered a crew largely of exiled Moors, and launched pirate expeditions against Spain and Portugal to avenge the Reconquista, protect Morocco from Christian pirates, and seek riches and glory. She co-founded the Barbary Corsairs with her allies the Barbarossa brothers, who divided the Mediterranean between them—the Barbarossas and their Ottoman fleet operating in the east, and Sayyida al-Hurra and her Moorish and North-African pirates operating in the west. Sayyida al-Hurra became wealthy and renowned enough for the Sultan of Morocco, Ahmad al-Wattasi to make her his queen. Notably, however, she refused to marry in his capital of Fez, and would not get married but in Tétouan, of which she was governor. This was the first and only time in history that a Moroccan monarch had married away from his capital.

One of the stereotypical features of a pirate as portrayed in popular culture, the eye patch, was derived from the Arab corsair Rahmah ibn Jabir al-Jalahimah, who wore a patch after losing an eye in battle in the 18th century.[32]

The Little Johnny England song, "Lily of Barbary," tells the story of an English man who is enslaved by Barbary corsairs and sold as a slave in Algiers. He is freed when his master dies. He becomes a merchant and buys the freedom of another English slave girl.