Barbary pirates The Barbary pirates , sometimes called Barbary corsairs or Ottoman corsairs , were pirates and privateer s who operated from North Africa , based primarily in the ports of Algiers , Tunis and Tripoli . This area was known in Europe as the Barbary Coast , a term derived from the name of its Berber inhabitants . Their predation extended throughout the Mediterranean , south along West Africa ' s Atlantic seaboard and even South America , and into the North Atlantic as far north as Iceland , but they primarily operated in the western Mediterranean . In addition to seizing ships , they engaged in " Razzias " , raids on European coastal towns and villages , mainly in Italy , France , Spain , and Portugal , but also in the British Isles , the Netherlands and as far away as Iceland . The main purpose of their attacks was to capture Christian slaves for the Muslim market in North Africa and the Middle East . 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 and 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 , but strictly speaking Morocco , which never came under Ottoman dominance , was not one of the Barbary States . Corsairs captured thousands of ships , and long stretches of coast in Spain and Italy were almost completely abandoned by their inhabitants , discouraging settlement until the 19th century . From the 16th to 19th century , corsairs captured an estimated 800 , 000 to 1 . 25 million people as slaves . Some corsairs were European outcasts and converts such as John Ward and Zymen Danseker . Hayreddin Barbarossa and Oruç Reis , the Barbarossa brothers , who took control of Algiers on behalf of the Ottomans in the early 16th century , were also famous corsairs . The European pirates brought state - of - the - art sailing and shipbuilding techniques to the Barbary Coast around 1600 , which enabled the corsairs to extend their activities into the Atlantic Ocean , and the impact of 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 - 5 European powers agreed upon the need to suppress the Barbary corsairs entirely and the threat was largely subdued , although occasional incidents continued until finally terminated by the French conquest of Algiers in 1830 . History . Piratical activity by Muslim populations had been known in Mediterranean since at least the 9th century and the short - lived Emirate of Crete . Despite the animosity generated by the Crusades , the level of Muslim pirate activity was relatively low . In the 13th and 14th century it was rather Christian pirates , particularly out of Catalonia , that had been the constant threat to merchants . It was not until the late 14th century that Tunisian corsairs had become enough of a threat to provoke a Franco - Genoese attack on Mahdia in 1390 , also known as the " Barbary Crusade " . Moorish 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 Christian shipping . 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 . The many captives required regular fundraising by families and local church groups , who generally raised the ransoms for individuals . The English became familiar with captivity narratives written by Barbary pirates ' prisoners and some whom were sold into Arab slavery before the North American colonies were well established . This was decades before English colonists became subject to captivity by Native Americans and began to write their own narratives . During the American Revolution , the pirates attacked American ships . On December 20 , 1777 , Morocco ' s Sultan Mohammed III declared that the American merchant ships would be under the protection of the sultanate and could thus enjoy safe passage into the Mediterranean and along the coast . The Moroccan - American Treaty of Friendship stands as the U . S . ' s oldest non - broken friendship treaty with a foreign power . In 1787 Morocco had been one of the first nations to recognize the United States . As late as 1798 , an islet near Sardinia was attacked by the Tunisians and over 900 inhabitants were taken away as slaves . 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 like 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 would then have time to prepare their attacks and surprise their victims . 16th century . Spanish Moors and Muslim adventurers from the Levant , of whom the most successful were Hızır and Oruç , natives of Mitylene , increased the amount of raids around the turn of the 15th century . In response , Spain began to conquer the coast 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 Uluch Ali in 1587 , Algiers was the main seat of government of the beylerbey s of northern Africa , who ruled over Tripoli , Tunisia and Algeria . From 1587 to 1659 , they were ruled by Ottoman pasha s , 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 which chose their own rulers and lived by war booty captured from the Spanish and Portuguese . There are several cases of Sephardic Jew s , 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 . 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 " . In 1544 , Hayreddin captured the island of Ischia , taking 4 , 000 prisoners , and enslaved some 9 , 000 inhabitants of Lipari , almost the entire population . In 1551 , Turgut Reis enslaved the entire population of the Maltese island Gozo , between 5 , 000 and 6 , 000 , sending them to Ottoman Libya . In 1554 , corsairs sacked Vieste in southern Italy and took an estimated 7 , 000 slaves . In 1555 , Turgut Reis sacked Bastia , Corsica , taking 6 , 000 prisoners . In 1558 , Barbary corsairs captured the town of Ciutadella ( Minorca ) , destroyed it , slaughtered the inhabitants and took 3 , 000 survivors to Constantinople as slaves . 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 the island of Formentera became uninhabited . 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 frigate s ; light , fast and manoueverable 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 , though this latter objective 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 . 17th century . The first half of the 17th century saw the peak of Barbary raiding . 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 . 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 . In 1607 , the Order of Malta went on the offensive with forty - five galleys , capturing and pillaging the city of Bona in Algeria . The participation of the Knights of Saint Stephen ( under Jacopo Inghirami ) in this victory is commemorated by a series of frescoes painted by Bernardino Poccetti in the " Sala di Bona " of Palazzo Pitti , Florence . Barbary corsair attacks were common in southern Portugal , south and east Spain , the Balearic Islands , the Canary Islands , Sardinia , Corsica , Elba , the Italian Peninsula ( especially the coasts of Liguria , Tuscany , Lazio , Campania , Calabria and Apulia ) , Sicily and Malta . They also occurred on the Atlantic northwest coast of the Iberian Peninsula . In 1617 , the African corsairs launched their major attack in the region when they destroyed and sacked Bouzas , Cangas do Morrazo and the churches of Moaña and Darbo . 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 and , upon returning to Iceland , wrote a slave narrative about his experience . 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 . The prisoners were destined for a variety of fates — some lived out their days chained to the oars as galley slaves , while others would spend long years in the scented seclusion of the harem or within the walls of the sultan ' s palace . Only two of them ever saw Ireland again . 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 . 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 large legacies were left for that purpose in many countries . The continuation of piracy was assisted by 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 then benefited from the impact of continuing attacks on their competitors , and as a result there was little interest in imposing a more general cessation of corsair activity . The most successful of the Christian states in dealing with the corsair threat was England . 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 squadrons and mounted attacks on their home ports which 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 Sale followed in 1676 . Algiers , the most powerful of the Barbary States , returned to war the following year , breaking a treaty made in 1671 , but further defeats at the hands of an English squadron under Arthur Herbert forced Algiers to make peace again in 1682 , in a treaty which would last until 1816 . France , which had recently emerged as a leading naval power , achieved comparable success soon afterwards , with bombardments of Algiers in 1682 , 1683 and 1688 securing a lasting peace , while Tripoli was similarly coerced in 1686 . 18th – 19th centuries . In 1783 and 1784 it was the turn of Spaniards to bombard Algiers . The second time , Admiral Barceló damaged the city so severely that the Algerian Dey asked Spain to negotiate a peace treaty and from then on Spanish vessels and coasts were safe for several years . 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 , became in 1784 the first Barbary power to seize an American vessel after independence . The Barbary threat led directly to the creation of the United States Navy in March 1794 . While the United States managed to secure peace treaties , these obliged it to pay tribute for protection from attack . Payments in ransom and tribute to the Barbary states amounted to 20 % of United States government annual expenditures in 1800 . The First Barbary War in 1801 and the Second Barbary War in 1815 led to more favorable peace terms ending the payment of tribute . However , Algiers broke the 1805 peace treaty after only two years , and subsequently refused to implement the 1815 treaty until compelled to do so by Britain in 1816 . The Congress of Vienna in 1814 – 5 , which ended the Napoleonic Wars , led to increased consensus on the need to achieve a general halt to 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 . This led to complaints from states which were still vulnerable to the corsairs that Britain ' s enthusiasm for ending the trade in African slaves did not extend to 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 Lord Exmouth was sent 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 and the imposition of peace between Algiers and the kingdoms of Sardinia and Sicily . On his first visit he 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 , he bombarded Algiers . Both Algiers and Tunis made fresh concessions as a result . However , securing uniform compliance with a total prohibition of slave - raiding , which was traditionally of central importance to the North African economy , presented difficulties beyond those faced in ending attacks on ships of individual nations , which had left slavers able to continue their accustomed way of life by preying on less well - protected peoples . Algiers subsequently renewed its slave - raiding , though on a smaller scale . Measures to be taken against the city ' s government were discussed at the Congress of Aix - la - Chapelle in 1818 . In 1820 another British fleet under Admiral Sir Harry Neal again bombarded Algiers . Corsair activity based in Algiers did not entirely cease until its conquest by France in 1830 . Barbary slaves . While Barbary corsairs naturally looted the cargo of ships they captured , their primary goal was to capture and enslave people on land or at sea . The slaves were often sold or put to work in various ways in North Africa . 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 Istanbul and Salé . Being captured was just the first part of a slave ' s nightmare journey . Many slaves died on the ships during the long voyage back to North Africa due to disease or lack of food and water . Those who survived the journey were made a spectacle of as they walked through town on their way to the slave auction . The slaves would then have to stand from eight in the morning until two in the afternoon while buyers passed by and viewed them . Next came the auction , where the townspeople would bid on the slaves 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 , these slaves would either become slaves for ransom , or they would 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 ' bagnio s < nowiki > ' < / nowiki > that were often hot and overcrowded . However , these bagnios began improving by the 18th century , and some bagnios had chapels , hospitals , shops , and bars run by slaves , though such amenities remained uncommon . Galley slaves . Although the conditions in bagnios were harsh , they were better than those galley slaves had to endure . Most Barbary galleys were at sea for around eighty to a hundred days a year , so the slaves were not on them constantly , but when they were not rowing the galleys they were forced to do hard manual labor on land . There were exceptions : " galley slaves of the Ottoman Sultan in Istanbul 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 . " 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 . Freedom for slaves . 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 charity funding for ransoming slaves increased , North African states increased the ransom required . Lack of money to pay a ransom was not the only problem ; slaves needed to notify their families that they were captive and inform them of the ransom price , and would need to pay hefty mailing charges ( which few slaves could afford ) and wait several months for the mail to be delivered . After payment of a ransom slaves often went through a port to wait for the ransom to be finalized ; in some cases in the 17th and 18th centuries slaves were kept at these ports under quarantine due to fear of the . Not many Barbary slaves could depend on being ransomed . They had to be deemed worthy of it . Many poor people were never brought back to their home . 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 , author of Don Quijote , who had been captured and enslaved , made four unsuccessful attempts to escape , and was eventually ransomed by his family . The most famous of runaway slaves was Thomas Pellow , who had the story of his journey published in 1740 . After several failed attempts , in which he was nearly killed , Pellow was finally able to escape to Gibraltar in July 1738 . Infamous Barbary corsairs . According to historian Adrian Tinniswood , the most notorious corsairs were English and European renegades who had learned their trade as privateer s , 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 . The English corsair Henry Mainwaring later returned to England with a royal pardon , was knighted , elected to Parliament and appointed a vice admiral of the Royal Navy . The Barbarossa brothers . Oruç Barbarossa . The most famous of the corsairs in North Africa were 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 . Hızır Hayreddin Barbarossa . 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 . Captain Jack Ward . 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 . In fiction . Barbary corsairs are protagonists in " Le pantere di Algeri ( the panthers of Algiers ) " by Emilio Salgari and appear in a number of other famous novels , including " Robinson Crusoe " by Daniel Defoe , " The Count of Monte Cristo " by Alexandre Dumas , père , " The Wind in the Willows " by Kenneth Grahame , " The Sea Hawk " and the " Sword of Islam " by Rafael Sabatini , " The Algerine Captive " by Royall Tyler , " Master and Commander " by Patrick O ' Brian , the " Baroque Cycle " by Neal Stephenson , " The Walking Drum " by Louis Lamour , " Doctor Doolittle " by Hugh Lofting , " Corsair " by Clive Cussler and " Angélique in Barbary " by Anne Golon . Miguel de Cervantes , the Spanish author , was captive for five years as a slave in the " bagnio " of Algiers , and reflected his experience in some of his fictional ( but not directly autobiographical ) writings , including the Captive ' s tale in " Don Quixote " , his two plays set in Algiers , El Trato de Argel ( The Treaty of Algiers ) and Los Baños de Argel ( The Baths of Algiers ) , and episodes in a number of other works . Barbary corsairs also feature in many pornographic novel s , such as " The Lustful Turk " ( 1828 ) , where the abduction of white women into sexual slavery is an abiding interest . One of the stereotypical features of a pirate in popular culture , the eye patch , dates back to the Arab corsair Rahmah ibn Jabir al - Jalahimah , who wore it after losing an eye in battle in the 18th century . The Little Johnny England song " Lily of Barbary " tells the story of an English man who is enslaved by Barbary corsairs and sold in Algiers , but is freed when his master dies . He then becomes a merchant and buys the freedom of another English slave girl .