 Although he had one other cardinal among his relatives, no other information about his early life survives.However, by age 22 in 1780 he had become archpriest of the patriarchal Lateran basilica and in the following two decades became caught up in the controversy of the French Revolution, being imprisoned in 1798 and kept in captivity between 1811 and 1814.He was deputy vicar of Rome for long periods from 1795 to 1818 as the actual vicar, Cardinal Giulio Maria della Somaglia, was frequently absent.