In 1796, French troops under the command of General Napoleon Bonaparte invaded Italy, defeated the Papal Army, and occupied Ancona and Loreto.
General Louis-Alexandre Berthier marched to Rome, entered it unopposed on 10 February 1798 and, proclaiming a Roman Republic, demanded the pope renounce his temporal power.
It was not until the conclave of cardinals had gathered to elect a new pope that Napoleon decided to bury Pius VI who had died several weeks earlier.
This eventually led to the Concordat of 1801 negotiated by Ercole Consalvi, the pope's secretary of state, which re-systemised the linkage[clarification needed] between the French church and Rome.
Appointed by Napoleon on 4 April 1803 to succeed François Cacault on the latter's retirement from the position of French ambassador to Rome, Cardinal Joseph Fesch was assisted by François-René de Chateaubriand[clarification needed], but soon sharply differed with him on many questions.
Towards the close of 1804, Napoleon entrusted to Fesch the difficult task of securing the presence of Pope Pius VII at the forthcoming coronation of the emperor at Notre-Dame in Paris.
Notwithstanding his extreme age, he governed his new diocese with astonishing vigour and intelligence, reorganised the parishes, provided them with good pastors, and visited his flock in person.
The following month, the Kingdom of Italy annexed the papal provinces of Ancona, Macerata, Fermo, and Urbino, and diplomatic relations were broken off.
On 17 May 1809, Napoleon issued two decrees from Schönbrunn Palace near Vienna in which he reproached the popes for the ill use they had made of the donation of Charlemagne, his "august predecessor”, and declared those territories which were still under the direct control of the Papal States were to be annexed by the French Empire.
[1] When Pius VII subsequently excommunicated Napoleon, one of his most ambitious officers, Lieutenant Radet, saw an opportunity to gain favour by kidnapping the pope.
Napoleon sent several delegations to pressure the pope to yield power and sign a new concordat with France, including invoking a church council.
The pope also gave the hussars a flag, now in the Vienna Arsenal, reading "Ungariae Patronae Pium comitatis ad Urbem; O felix tanto Roma sub auspicio - Boldog vagy Róma, hogy érzed a Magyarok Nagyasszonyának oltalmát, ki Piust a Városba kísérte" (You are happy Rome to feel the protection of Our Lady of Hungary, who accompanied Pius to the City).
During Napoleon's exile on Saint Helena, the pope wrote to the British government asking for better treatment of the former emperor, saying: "He can no longer be a danger to anybody.