The War of the League of Cognac (1526-1530) was a chapter of the Italian Wars that pitted the Holy Roman Empire and Spain against the "League of Cognac", consisting of France, the Papal States, the Republic of Venice, England, the Duchy of Milan, and the Republic of Florence.
In the aftermath of the decisive Imperial-Spanish victory at the Battle of Pavia in 1525, Pope Clement VII began to organize an alliance to drive Emperor Charles V's forces from Italy. Francis I was released from imprisonment in Spain after renouncing his claims to Italy, Flanders, and Burgundy under the Treaty of Madrid, but he announced his intention to support the Pope against the Habsburgs, his rivals. In 1526, the League of Cognac was signed by Francis, Clement, Venice, Florence, and the Sforza of Milan. Henry VIII of England hoped to join the League, but the nobility of England - who were strongly anti-French - refused to sign the treaty.
The League quickly seized Lodi, but Imperial troops moved into Lombardy and forced the Sforza to abandon Milan. The Colonna family organized an attack on Rome, and the Colonna forces briefly seized the city in September 1526; they were later bribed to abandon the city. At this point however, Emperor Charles V gathered a force of German landsknechts under Georg von Frundsberg and a Spanish army under Charles III, Duke of Bourbon, and these forces combined at Piacenza and marched south on Rome. Niccolo Machiavelli's friend and fellow statesman, Francesco Guicciardini, was entrusted with the city's defense. Guicciardini was unable to hold back the powerful Imperial-Spanish army, but the Duke of Bourbon was killed during the advance on the city. His underpaid mercenary soldiers mutinied against the Emperor and proceeded to sack the city of Rome, and the Swiss Guard made its heroic last stand as the Pope fled.
The looting of Rome removed Pope Clement from any real role in the war, and Henry VIII - disgusted by this act of sacrilege - allied with Francis in 1527 and sent troops to assist Francis in fighting against the Habsburgs. Francis sent an army under Odet of Foix and Pedro Navarro through Genoa to besiege Naples, with Andrea Doria seizing much of the Genoese fleet to ally with France. However, he switched sides in Charles' favor, and the siege of Naples collapsed as plague broke out in the French camp. Foix, Navarro, and most of the army were killed by this plague, and Andrea Doria managed to break the French blockade of Genoa before forcing a French army to surrender at Savona. A French relief force was defeated at Landriano, ending Francis' hopes of regaining Italy.
In July 1529, Francis began peace negotiations with Emperor Charles V at Cambrai, and Francis surrendered his claims on Artois, Flanders, and Tournai to Charles. On 5 August 1529, France made peace with the Habsburgs, leaving Venice, Florence, and the Pope alone in the fight against Charles. The Pope and Venice later made peace with Charles; the Pope received Ravenna, Cervia, and Apulia from Venice in exchange for Venice acquiring parts of Lombardy, and the Sforza purchased the ability to return to ruling Milan. Francesco Feruccio and the forces of Florence continued to resist the Imperial forces alone, and Florence was besieged from 1529 to 1530. Philibert of Chalon was killed by two arquebus balls at the Battle of Gavinana on 3 August 1530, but the Imperial army defeated the Florentines, and Florence fell a week later. Charles V had Alessandro de Medici installed as the head of the Duchy of Florence, restoring the Medici to power in the city.