But when during the early 1840s unrest spread throughout Italy, even in Tuscany demands for a constitution and other political reforms were advanced; in 1845 and 1846 riots occurred in various parts of the country, and Leopold granted a number of administrative reforms. But Austrian influence prevented him from doing more, even had he wished to do so. The election of Pope Pius IX gave fresh encouragement to Liberalism, and on 4 September 1847 Leopold instituted the National Guard – a preparation for a constitution; soon afterward the marchese Cosimo Ridolfi was appointed prime minister. The granting of the Neapolitan and Piedmontese constitutions was followed (17 February 1848) by that of Tuscany, composed by Gino Capponi.