The Liberation of Italy occurred from 10 July 1943 to 2 May 1945 when the Allied Powers, led by the United States and the British Commonwealth, invaded and liberated Italy from Axis occupation during World War II. The campaign began with Operation Husky, the Allied invasion of Sicily, in July 1943, and the Allies quickly overwhelmed and destroyed Royal Italian Army; on 25 July 1943, the Grand Council of Fascism voted to depose Benito Mussolini as ruler of Fascist Italy, replacing him with Pietro Badoglio. Sicily fell to the Allies on 17 August, and, on 3 September 1943, the Italian government signed the Armistice of Cassibile with the Allies, ending hostilities between the Allied Powers and the Kingdom of Italy. Italy's collapse forced the German dictator Adolf Hitler to terminate his offensive against the Soviets at the Battle of Kursk and transfer considerable forces from Eastern Europe to Italy, disarming the Italian armed forces from southern France to Italy and the Balkans from 8 to 19 September 1943, and effectively annihilating the Italian military. Italian units on Sardinia, Corsica, Calabria, and southern Apulia went over to the Italian Resistance rather than be disarmed, forming the Italian Co-Belligerent Army to fight alongside the Allies as they prepared to liberate the rest of Italy from the newly-implemented German occupation.
From 3 to 17 September 1943, starting with Operation Avalanche at Salerno in Campania, the Allies landed in southern Italy, and the British captured Taranto on 9 September in Operation Slapstick. From September 1943 to May 1945, the Italian campaign was marked by an Allied push up the "boot" of Italy, and up to 70,000 Allied and 150,660 German soldiers were killed in action in Germany during that time, as well as 150,000 Italian civilians, 35,828 Italian Resistance fighters, and 35,000 troops of the Italian Social Republic. The Allied push up Italy ran into fierce resistance at the Winter Line from December 1943 to June 1944, the Battle of Anzio on 22 January-5 June 1944 (resulting in the liberation of Rome), and the Gothic Line from 25 August 1944 to early April 1945. While the deposed Mussolini was installed as leader of the fascist Italian Social Republic by his German allies, the Italian Social Republic played a secondary role in the conflict, as Nazi Germany's Wehrmacht presided over the occupation of Axis-held Italy, fought against the Allied invasion, and - in conjunction with the Italian Social Republic - committed several atrocities against civilians and non-fascist troops. The Italian Resistance also aided the Allies in their fight against the Italian collaborationists in what became known as the Italian Civil War.
The Allied liberation of Rome on 4 June 1944 was followed by the Allied advance to Florence from June to August 1944, only for the Allies to come up against the Gothic Line from Florence and Bologna to the Adriatic coast just south of Rimini. On 18 July 1944, Polish troops captured Ancona from the Germans, and, in the winter and spring of 1945, partisan activity intensified as the Allied advance stalled. In February–March 1945, in Operation Encore, American and Brazilian forces pushed the Germans back from their defenses at Monte Castello. On 9 April 1945, the Allies launched their final offensive of the campaign, capturing Bologna on 21 April and reaching the River Po a day later. On 25 April, the Italian Resistance declared a general uprising, and the 26–29 April Battle of Collecchio saw the Brazilians capture 15,000 German and Italian soldiers, ending the Italian fascist army. By the month's end, the German Army Group C had lost most of its fighting strength and was left with little option but to surrender, and the German commander Heinrich von Vietinghoff signed the instrument of surrender on behalf of the German armies in Italy on 29 April. Hostilities ended on 2 May 1945.