His first attempt to besiege Navarino in 1572 was fruitless, being forced to retire, although in its course his admiral Álvaro de Bazán captured an enemy galley commanded by a grandson of Hayreddin Barbarossa, after which they confirmed the Ottomans' mostly defensive attitude.
A new grand campaign was cancelled with the disbanding of the Holy League and the negotiations between the Ottomans and the Republic of Venice, leading the Spanish Monarchy to ponder about a new conquest in Africa.
Knowing the Spanish garrison in the La Goleta fort in Tunis was still besieged since the 1569 capture of the city by Occhiali, this was the chosen target.
[1] Although most of the Spanish Empire's resources were focused in the Atlantic Ocean, deeming the Mediterranean Sea was a theater free of strategic dangers after the outcome of Lepanto, Don John gathered 152 galleys, many of them Ottoman vessels captured in the battle.
As long as John of Austria's fleet arrived in Tunis, the local population mutinied against the Turk garrison, capturing many of them.