[1] De Gregorio was born at sea while his mother was traveling to Spain.
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.
However, it is known that at one point the revolutionary government of France had planned to create him antipope in opposition to Pope Pius VI when he condemned the French Revolution in 1791.
In 1816, Pope Pius VII made De Gregorio a cardinal and in the following decade he rose to be one of the most powerful men in the Church.
In both the 1829 and 1830 conclaves, he was considered one of the leading papabili but had too many opponents to be elected Pope.