The United States fought two wars (the First and Second Barbary Wars) over Algiers' attacks on shipping.
Among the notable people held for ransom was the future Spanish novelist Miguel de Cervantes, who was captive in Algiers almost five years, and who wrote two plays set in Algiers of the period.
In 1510, following their occupation of Oran and other towns on the coast of Africa, the Spaniards fortified the islet of Peñon In 1516, the amir of Algiers, Selim b.
Teumi, invited the corsair brothers Aruj and Hayreddin Barbarossa to expel the Spaniards.
Many occupied positions of authority, such as Samson Rowlie, an Englishman who became Treasurer of Algiers.