In 1529, Khayr ad-Din took control of Algiers and made it the
base for piracy. Suleiman made Khaya ad-Din admiral-in-chief of his
navy, and in 1534 Khayr ad-Din captured Tunis. Charles V, the
Habsburg emperor of Spain, sent a force that retook Tunis. Then in
1538 Khayr ad-Din defeated Charles' navy at the Battle of Preveza.
Twice -- in 1533 and 1544 - Khayr ad-Din defeated the Italian
admiral Andrea Doria, giving the Ottomans control over the
Mediterranean Sea. Khayr enjoyed a great presence at court until
his death in 1546. Suleiman lived until 1566.