Meanwhile, the Italian nationalist Giuseppe Garibaldi led a nationalist uprising to joun the states and territories into one republic. As Sardinia ended the war, Garibaldi gave it most of the provinces. In March 1861, a parliament of all of Italy except Rome and Venetia agreed to unify Italy with Victor Emmanuel as its first king. When Prussia defeated Austria in a war in 1866, Italy struck a deal with Berlin to fore Vienna to turn over Venetia which left Rome as the last Italian city not yet added.