In Milan , Silvio Pellico and Pietro Maroncelli organised several attempts to weaken the hold of the Austrian despotism by indirect educational means. In October 1820, Pellico and Maroncelli were arrested on the charge of carbonarism and conveyed to the Santa Margherita prison. The sentence of death pronounced on them in February 1822 was finally commuted to fifteen and twenty years of jail in harsh condition, and in the following April they were placed in the Spielberg , at Brünn (today's Brno), where they were transferred via Udine and Ljubljana . 
The war itself was quite short. The Austrian advance into Piedmont was incompetent, and they were unable to secure the Alpine passes before the arrival of the French army, led personally by Napoleon III. At Magenta on June 4 , the French and Sardinians were victorious over the Austrian army of Count Gyulai, leading to Austrian withdrawal from most of Lombardy and a triumphal entry by Napoleon and Victor Emmanuel into Milan. On June 24 , a second battle was fought between the two armies at Solferino . This bloody engagement, at which the Austrian Emperor Franz Joseph had also taken personal command of his troops, saw little skill demonstrated by the leaders on either side, but the French were again victorious. The Austrians withdrew behind the Quadrilateral of fortresses on the borders of Venetia.