The French Revolution not only saw the leveling of the old hierarchies of nobility but also a revolt against the power and control of the Catholic Church. The land of the Church was seized and the National Assembly issued the Civil Constitution of the Clergy, which made the Church a department of France and removed it from the control of the Pope. This led to a series of revolts within France, particularly in the West and Northwest, among the Vendeans, and with those loyal to the Church. Occasionally these received the support of the ever-watchful English.
Napoleon was not a religious man, but nor did he seek all-out war with the Catholic faith. As he wrote to his brother Lucien, "Skillful conquerors have not got entangled with priests. They can both contain them and use them." He was content to allow the Church to exist, so long as it did not seek to thwart his territorial gains, aid his enemies, or instigate insurrection within conquered territories. Hoping thus to "contain them and use them", Napoleon signed the Concordat of 1801 with the Pope, which restored some ties to the papacy but overall favored the French state. Catholicism was declared the religion of "the great majority of the French" but not the official state religion. The Church in turn gave up any hopes of appointing bishops or of reclaiming land taken in 1790, and the French clergy swore an oath to the state. In 1804, Pope Pius VII himself was induced to place the Emperor's crown on Napoleon's head when he became ruler for life. Napoleon accomplished this through a combination of promising concessions to the Church coupled with threats. In March of 1805, after an extended stay in Paris, the Pope left for Rome. This marked an end to their somewhat friendly relationship. Napoleon had given too little and demanded too much.
Napoleon's Continental System, a series of blockades intended primarily to preclude trade with the British, also threatened the Pope's authority within his sphere of influence, which extended to the port towns of Ancona, Civita Vecchia and Ostia, just an hour today by car from the Vatican. Also, in June 1805, the Code Napoleon, the Emperor's civil statutes that modernized and secularized the laws throughout his Empire, was extended to Italy. It permitted divorce, and replaced religious with secular laws.
The year 1805 saw the demise of the Third coalition. Austria and Russia were humiliated at Austerlitz, which led to the end of the Holy Roman Empire. Napoleon occupied Ancona on the east coast of Italy, on the same plane as Rome. The Pope objected. Particularly after his defeat at Trafalgar that same year, Napoleon insisted that the Continental Blockade must be enforced, the British Minister expelled, and the Papal Ports closed to the British and others. The Pope left his ports open; he wanted to pick no gripe with the British. In March of 1806, Napoleon defeated the Neapolitans and established the Kingdom of Naples under Joseph, his brother. The Pope refused to condone this incursion into his sphere of influence and demanded tribute in return for recognition, which, of course, Napoleon refused.
At the same time, a group of religious scholars, loyal to the Pope, called the "Sages of Bologna," revolted, and refused to follow Napoleon's Civil Code. Signs of dissension abounded. Eugene de Beauharnais, Napoleon's stepson (son of Josephine from a previous marriage), was the Viceroy of the Kingdom of Italy. In May of 1806, he wrote, "The enemies of His Majesty are, at this moment, rebelling in Bologna in order to provoke disobedience of the laws, particularly the Civil Code and the Concordat. You know that it is in the name of religion that the Sages of Bologna have refused to execute many articles of the Napoleonic Code." By early June, Naples was in the hands of Joseph, still unrecognized by the Pope, though the situation had calmed in Bologna, largely due to the exertions of Eugene. The English still operated in Papal ports and Napoleon was fuming. This was Napoleon's moment, as he set out to punish those responsible, diminish the Pope, and extend his sovereignty over Papal authority.
In this well known letter, he distributes his troops from the Naples campaign, and momentously orders the occupation of Ostia and Civita Vecchia as a direct response to Pope Pius' refusal to expel the English from Rome. He refuses to leave Ancona and militarizes it. And he orders the prosecution of those religious leaders who would buck his civil rule.
Letter signed, Saint-Cloud, June 21, 1806, to his stepson, Prince Eugene de Beauharnais. "My Son, the 7th regiment of French dragoons, the dragoons of the Queen, the Hanoverian legion, the 4th regiment of the Italian line, the Polish cavalry, the royal hunters, and the 30th regiment of French dragoons, have left the army of Naples to enter the Kingdom of Italy. Here are my intentions with regards to these regiments: You will leave the Hanoverian legion on horseback, the 4th regiment of the Italian line and the Polish cavalry will be under the orders of General Duhesme and occupy the coast of Ostia and Civita Vecchia; if there is no artillery, you will send a company of Italian cannoniers, which you will compose of 100 men; you will leave the 7th and 30th regiments of dragoons at Ancone, and you will bring home to the Kingdom of Italy the Queen's dragoons and the royal hunters. You will place these regiments in a place where they might reorganize and where you can see to their instruction. The King of Naples has kept the Napoleon Dragoons, probably because he judged them the best disciplined. I have not yet responded to your letter of the 14th of June relating to the accused in the affair of Bologna. We must prosecute all those there are to prosecute."
Napoleon's decision here to challenge rather than accommodate the Pope had ramifications. Relations between the two deteriorated after this letter. Within a couple of years, Napoleon took over administration in the Papal States, to which the Pontiff responded by issuing a bill of excommunication against the ‘Emperor.’ On July 5, 1808, on Napoleon’s orders, Pope Saint Pius VII was arrested and detained for three years, first at Savona, Italy, then at Fontainbleau, France.