After long years of peace following the Napoleonic Wars, Europe was convulsed by movements for national unification and freedom that first found expression as revolutionary upheavals, then from 1859 as wars between states fielding armies carrying industrially produced weapons.
In 1859, Emperor Napoleon III of France was looking for a small foreign war in which he could emulate the success of his famous uncle Napoleon I. His agents told him that the Italian states were ripe for another rebellion and that Austria was suffering internal problems. Napoleon III therefore offered to help Piedmont defeat Austria in return for Nice and Savoy. Victor Emmanuel agreed and war was declared on 26 April 1859. The peoples of Tuscany, Parma and Modena at once rose in rebellion, tying down the Austrian garrisons located in those states and safeguarding the southern flank of the French-Piedmontese advance.
Napoleon III then played his trump card. He moved thousands of French soldiers, complete with guns, ammunition and support services across Piedmont by rail. The French therefore arrived much sooner and far fresher than the Austrians had expected. Austrian reinforcements, coming over the Alps by the traditional method of marching, found themselves outmanoevred. The local Austrian forces based in Lombardy and Venetia were defeated at Magenta on 4 June. The battle cost the French under MacMahon 4,000 men, but the Austrians under Gyulai suffered more heavily and were thrown back in a hasty retreat first to Milan, and then east toward Verona.
The retreating Austrians met their advancing reinforcements at Solferino and hurriedly occupied a strong defensive position on the hills above the town. The Emperor Franz Josef himself had arrived to boost the morale of his men, and the experienced commander Scholick was in operational command. The Austrians had 120,000 men and 451 guns, which were positioned with care on the hills and among the woods.