He was created and proclaimed Cardinal-Priest of Santa Maria in Via, but only in pectore, in the consistory of 23 February 1801. This was published in the consistory of 9 August 1802. He was appointed Prefect of the Congregation of Propaganda Fide on 24 May 1805, in addition to his duties in Jerusalem. He held the post until 20 May 1814. He was taken to France together with Cardinal Ercole Consalvi in December 1809 and banished to Semur-en-Auxois for not attending Napoleon's wedding with Maria Louise. He was imprisoned in the fortress of Vincennes at the end of 1810 for sending the papal order to the clergy of Paris not to recognise Jean-Siffrein Maury as Archbishop of Paris. He was appointed Major Penitentiary of the Apostolic Penitentiary ad interim in 1811, holding the post until 1814. He was freed in January 1813, and arrested again in April. He was considered responsible, together with Bartolomeo Pacca, for Pope Pius VII's retraction of his agreement with Napoleon. One of the most distinguished "black cardinals" (prohibited by Napoleon to wear red cardinalitial habit). He was made full Major Penitentiary in 1814. He opted for the order of bishops and the suburbicarian see of Albano in 1816. He was appointed Prefect of the Congregation of the Index in 1818. He opted for the suburbicarian see of Porto e Santa Rufina in 1820. He died in July 1821. His funeral took place on 5 July 1821 and he is buried in the cathedral of Albano.