In 1851 he graduated in Engineering and Architecture in Pavia. In 1859 he again enrolled as volunteer in the Cacciatori delle Alpi corps, obtaining the grade of second lieutenant and a Silver Medal for Military Value. In 1860 he took part to Giuseppe Garibaldi's Expedition of the Thousand which led to the unification of Italy, quickly reaching the grade of colonel.