Napoleon, to whom Max Joseph owed his coronation as king, signed the declaration of war against Prussia on October 6, 1806, at the New Residence in Bamberg.
The campaign against Russia in 1812 also began in Franconia. 30.000 Bavarian soldiers lost their lives. Afterwards, Bavaria switched sides and formed an alliance with Napoleon's adversaries Austria, Prussia and Russia
In 1818, Max Joseph established a constitution of the Kingdom of Bavaria which endorsed Constitutional Monarchy as form of government and stayed in force until the German Revolution in 1918.
The 25th anniversary of Max Joseph's accession to power as elector and successor of Karl Theodor was celebrated throughout Bavaria in 1824.
However, the King died one year later at the age of 70. Funeral services were being held in all of Bamberg's churches.