Barbarossa Hayreddin (Khidr) Pasha (c. 1478 – 4 July 1546) was a Barbary pirate and later admiral of the Ottoman fleet, by whose initiative Algeria and Tunisia became part of the Ottoman Empire. For three centuries after his death, Mediterranean coastal towns and villages were ravaged by his pirate successors.
Barbarossa (Redbeard) was one of four sons of a Turk from the island of Lesbos. His mother was referred as a local Christian Greek woman from Mytilene, the widow of an Orthodox priest. Hatred of the Spanish and Portuguese who attacked North Africa between 1505 and 1511 encouraged Khiḍr and his brother ʿArūj to intensify their piracy. They hoped, with the aid of Turks and Muslim emigrants from Spain, to wrest an African domain for themselves and had begun to succeed in this design when ʿArūj was killed by the Spanish in 1518. Khiḍr, who had been his brother’s lieutenant, then assumed the title Khayr ad-Dīn. Fearing he would lose his possessions to the Spanish, he offered homage to the Ottoman sultan and in return was granted the title beylerbey and sent military reinforcements (1518). With this aid Khayr ad-Dīn was able to capture Algiers in 1529 and make it the great stronghold of Mediterranean piracy. In 1533 he was appointed admiral in chief of the Ottoman Empire, and the next year he conquered the whole of Tunisia for the Turks, Tunis itself becoming the base of piracy against the Italian coast. The Holy Roman emperor Charles V led a crusade that captured Tunis and Goletta in 1535, but Barbarossa defeated Charles V’s fleet at the Battle of Preveza (1538), thereby securing the eastern Mediterranean for the Turks (until their defeat at the Battle of Lepanto in 1571). Barbarossa remained one of the great figures of the court at Constantinople until his death.