On 17 May 1809, Napoleon annexed the Papal States on the grounds that what Charlemagne, the first Holy Roman Emperor had given, Napoleon as the new Emperor could take away. However, one of the main reasons for Napoleon’s action was Pius VII’s refusal to support the French against the British.
Napoleon joined the Papal States to the French Empire, made Rome a free imperial city, and planned for a constitutional government to be placed upon the former territory of the Pope.
In response, Pope Pius VII had bulls of excommunication placed on the doors of Rome’s churches which imposed this sentence on anyone who participated in the annexation, including Napoleon himself. Pius VII, fully expecting to be imprisoned or executed by Napoleon also issued a bull calling for a new papal election. Indeed, French troops would arrest Pius VII in July of 1809 and he would remain a prisoner of Napoleon until May 1814.