Member of the "Historical Right", he was Minister of the Interior in the governments led by Camillo Benso, Count of Cavour and Bettino Ricasoli. He was also Minister of the Treasury in the government led by Luigi Carlo Farini. He was twice Prime Minister of the Kingdom of Italy: from 24 March 1863 to 28 September 1864 and from 10 July 1873 to 25 March 1876. 