 Montgelas now aspired to raise Bavaria to the rank of a first-rate power, and he pursued this object during the Napoleonic epoch with consummate skill, allowing fully for the preponderance of France – so long as it lasted – but never permitting Bavaria to sink, like so many of the states of the Confederation of the Rhine, into a mere French dependency.In the war of 1805, in accordance with a treaty of alliance signed at Würzburg on 23 September, Bavarian troops, for the first time since the days of Charles VII, fought side by side with the French, and by the Treaty of Pressburg, signed on 26 December, the Principality of Eichstädt, the Margravate of Burgau, the Lordship of Vorarlberg, the countships of Hohenems and Königsegg-Rothenfels, the lordships of Argen and Tettnang, and the city of Lindau with its territory were to be added to Bavaria.On the other hand, Würzburg, obtained in 1803, was to be ceded by Bavaria to the elector of Salzburg in exchange for Tirol .