The War of the Third Coalition lasted from about 1803 to 1806. Following defeat at the Battle of by the French under Napoleon in December 1805, Holy Roman Emperor Francis II abdicated, and the Empire was dissolved on 6 August 1806. The resulting Treaty of established the Confederation of the Rhine in July 1806, joining together sixteen of France's allies among the German states (including Bavaria and ). After the Battle of of October 1806 in the War of the Fourth Coalition, various other German states, including Saxony and Westphalia, also joined the Confederation. Only Austria, Prussia, Danish , Swedish Pomerania, and the French-occupied Principality of Erfurt stayed outside the Confederation of the Rhine. The War of the Sixth Coalition from 1812 to winter 1814 saw the defeat of Napoleon and the liberation of Germany. In June 1814, the famous German patriot Heinrich vom Stein created the Central Managing Authority for Germany ("Zentralverwaltungsbehörde") in Frankfurt to replace the defunct Confederation of the Rhine. However, plenipotentiaries gathered at the Congress of Vienna were determined to create a weaker union of German states than envisaged by Stein.