The new King of
Bavaria was the most important of the princes belonging to the
Confederation of the Rhine, and remained Napoleon's ally until the eve of the
Battle of Leipzig, when by the
Treaty of Ried (8 October 1813) he made the guarantee of the integrity of his kingdom the price of his joining the Allies. On 14 October, Bavaria made a formal declaration of war against
Napoleonic France. The treaty was passionately backed by Crown Prince
Ludwig and by
Marshal von Wrede. By the first
Treaty of Paris (3 June 1814), however, he returned Tyrol to
Austria in exchange for the former
Grand Duchy of Würzburg. At the
Congress of Vienna, which he attended in person, Maximilian had to make further concessions to Austria,in ceding
Salzburg and the regions of Innviertel and
Hausruckviertel in return for the western part of the old
Palatinate. The king fought hard to maintain the contiguity of the Bavarian territories as guaranteed at Ried but the most he could obtain was an assurance from
Metternich in the matter of the
Baden succession, in which he was also doomed to be disappointed. At Vienna and afterwards Maximilian sturdily opposed any reconstitution of Germany which should endanger the independence of Bavaria, and it was his insistence on the principle of full sovereignty being left to the German reigning princes that largely contributed to the loose and weak organization of the new
German Confederation. The
Federative Constitution of Germany (8 June 1815) of the
Congress of Vienna was proclaimed in Bavaria, not as a law but as an international treaty. It was partly to secure popular support in his resistance to any interference of the
Federal diet in the internal affairs of Bavaria, partly to give unity to his somewhat heterogeneous territories, that Maximilian on 26 May 1818 granted a liberal constitution to his people. Montgelas, who had opposed this concession, had fallen in the previous year, and Maximilian had also reversed his ecclesiastical policy, signing on 24 October 1817 a
concordat with Rome by which the powers of the clergy, largely curtailed under Montgelas's administration, were restored. The new
parliament proved to be more independent than he had anticipated and in 1819 Maximilian resorted to appealing to the powers against his own creation; but his Bavarian "
particularism" and his genuine popular sympathies prevented him from allowing the
Carlsbad Decrees to be strictly enforced within his dominions. The suspects arrested by order of the
Mainz Commission he was accustomed to examine himself, with the result that in many cases the whole proceedings were quashed, and in not a few the accused dismissed with a present of money. Maximilian died at
Nymphenburg Palace, in
Munich, on 13 October 1825 and was succeeded by his son
Ludwig I. Maximilian is buried in the crypt of the
Theatine Church in Munich. ==Cultural legacy==