On the outbreak of the First Italian Independence War against Austria he took command of the Lombard volunteers as major-general, and in the campaign of 1849 he was "aide-de-camp" to the king. He was elected member of the first Piedmontese parliament and was a strenuous supporter of Cavour; during the Sardinian expedition to Crimean he took General La Marmora's place as war minister.