Born in Mozzo into a family which had been active in Bergamo since the 16th century and which had held the title of count since the 18th century, he entered public life in 1816 as a member of the Lombard-Venetian guard during Francis II, Holy Roman Emperor's visit to Bergamo.