When Aruj was killed in 1518 during his invasion of Tlemcen, Hayreddin succeeded him as military commander of Algiers.
wˌɛn ˈæɹʌdʒ wʌz kˈɪld ɪn wˈʌn θˈaʊzənd fˈaɪvhˈʌndɹɪd ˈeɪtiːn dˈʊɹɹɪŋ hɪz ɪnvˈeɪʒən ʌv tˈiːlˈɛmsən, hˈeɪɹɪdˌɪn səksˈiːdᵻd hˌɪm æz mˈɪlətˌɛɹi kəmˈændɚɹ ʌv ældʒˈɪɹz.