Hasan Agha was the commander of Algiers during the 1541 Algiers expedition, in which Barbarossa was absent and which ended with catastrophic results for Charles V.