Considered the most loyal guardian of the Church and the staunchest opponent of Napoleon and general de Miollis, on 16 June he was arrested by the French troops in his office at the Quirinal Palace in Rome and forced to move to Senigallia; he was later deported to Novara, and then to Milan.
The following year, in an attempt to subtract the pope from the influence of the cardinal, Napoleon decided to confine him again at Le Vigan, in the Cévennes region of southern France: here he was given hospitality by the vicomte Henri d'Alzon, the father of Fr.
[2] In April 1814, after the abdication of Napoleon, he was liberated and returned to Rome, where the Pope appointed him Secretary of the Chancery of Apostolic Briefs and Prefect of the Sacred Congregation of the Tridentine Council (26 July 1814).
In 1819 he became Cardinal Protoprete (Protopriest) and consequently opted for the titulus of San Lorenzo in Lucina, that two centuries earlier had belonged to his forebear and namesake Giulio Gabrielli the Elder (1604–1677).
His brother, Prince Pietro Gabrielli (1746–1824) was a notable supporter of Napoleon and during the French occupation of the Papal States served as deputy mayor (maire adjoint) of Rome.