The capture of Algiers in 1516 was accomplished by the brothers Oruç and Hayreddin Barbarossa against Sālim al-Tūmī, the ruler of the city of Algiers, which was followed by an unsuccessful military campaign by the Spanish Empire and the Sheikh of Ténès to overthrow the newly formed Sultanate of Algiers.
^ abcBerber Government: The Kabyle Polity in Pre-colonial Algeria
By Hugh Roberts “in late September/early October 1516, a Spanish expeditionary force commanded by Diego de Vera transported by a fleet of some 30 vessels came to the support of the beleaguered garrison on the Peñon by mounting a concerted attack on Algiers, only to be routed by a fierce counter-attack led by Aruj, supported by Ou l-Qadi’s forces”