He defended Naples from the assault of the French troops under Odet of Foix, Viscount of Lautrec, and obtained the surrender of the Republic of Florence. For this feat Pope Clement VII, a member of the Medici who had been ousted from that city, named him papal governor of Benevento. Again for Charles V, he fought against the Turks at Tunis in 1535 and Algiers in 1541 with a contingent of 3,000 cavalry. He served Charles as Viceroy of Sicily (1535–1546), and Forte Gonzaga was named in his honour. He accompanied the Emperor to Germany in 1543 and fought the resolute campaign that enforced the Treaty of Crépy. He then served as Governor of the Duchy of Milan (1546–1554), in which role he fought in the War of Parma.