A few decades passed until in 1556 another Turkish corsair Dragut (Turgut), ruling in Tripoli, attacked Tunisia from the east, entering Kairouan in 1558. Then in 1569 Uluj Ali Pasha, a renegade corsair, now the successor to Khayr al-Din as the "Beylerbey" of Algiers, advanced with Turkish forces from the west, and managed to seize the Spanish presidio Goletta and the Hafsid capital, Tunis. After the key naval victory of the Christian armada at Lepanto in 1571, Don Juan de Austria in 1573 retook Tunis for Spain, restoring Hafsid rule. Yet Uluj Ali returned in 1574 with a large fleet and army, and captured Tunis with finality. To the Turkish sultan he then sent by ship, imprisoned, the last ruler of the Hafsid dynasty.