In 1532, the Habsburg emperor Charles V ordered the Genoese admiral Andrea Doria to attack it as a diversion to the campaigns of the Little War in Hungary.
[1] Doria managed to capture the city, and to lay waste to the surrounding coast.
[1] In spring 1533, the Ottoman Emperor Suleiman the Magnificent sent 60 galleys to retake the city.
[1] An Ottoman land army however was successful in laying a siege around the city, forcing its surrender on 1 April 1534.
The weakened Spanish garrison was allowed to leave the city unharmed.