in the Mediterranean.
The Ottomans established Algeria's modern boundaries in the north and made its coast a base for the Ottoman corsairs; their privateering peaked in Algiers in the 17th century. Piracy on American vessels in the Mediterranean resulted in the First (1801–1805) and Second Barbary Wars (1815) with the United States. The pirates forced the people on the ships they captured into slavery; when the pirates attacked coastal villages in southern and Western Europe the inhabitants were forced into the Arab slave trade.
The Barbary pirates, also sometimes called Ottoman corsairs or the Marine Jihad, were Muslim pirates and privateers that operated from North Africa, from the time of the Crusades until the early 19th century. Based in North African ports such as Tunis in Tunisia, Tripoli in Libya and Algiers in Algeria, they preyed on Christian and other non-Islamic shipping in the western Mediterranean Sea.
Ali Khoja, ruler of Algiers 1816–1818, surrounded by the severed heads of enemies
Their stronghold was along the stretch of northern Africa known as the Barbary Coast (a medieval term for the Maghreb after its Berber inhabitants), but their predation was said to extend throughout the Mediterranean, south along West Africa's Atlantic seaboard, and into the North Atlantic as far north as Iceland and the United States. They often made raids, called Razzias, on European coastal towns to capture Christian slaves to sell at slave markets in places such as Turkey, Egypt, Iran, Algeria and Morocco. According to Robert Davis, from the 16th to 19th century, pirates captured 1 million to 1.25 million Europeans as slaves. These slaves were captured mainly from seaside villages in Italy, Spain and Portugal, and from farther places like France, England, Ireland, the Netherlands, Germany, Poland, Russia, Scandinavia and even Iceland, India, Southeast Asia and North America.
In 1544, Hayreddin