Napoleon created the Kingdom of Westphalia (1807–1813) as a model state. These reforms proved largely permanent and modernized the western parts of Germany. When the French tried to impose the French language, German opposition grew in intensity. A Second Coalition of Britain, Russia, and Austria then attacked France but failed. Napoleon established direct or indirect control over most of western Europe, including the German states apart from Prussia and Austria. The old Holy Roman Empire was little more than a farce; Napoleon simply abolished it in 1806 while forming new countries under his control. In Germany Napoleon set up the "Confederation of the Rhine," comprising most of the German states except Prussia and Austria. Under Frederick William II's weak rule (1786-.1797) Prussia had undergone a serious economic, political and military decline. His successor king Frederick William III tried to remain neutral during the War of the Third Coalition and French emperor Napoleon's dissolution of the Holy Roman Empire and reorganisation of the German principalities. Induced by the queen and a pro-war party Frederick William joined the Fourth Coalition in October 1806. Napoleon easily defeated the Prussian army at the Battle of Jena and occupied Berlin. Prussia lost its recently acquired territories in western Germany, its army was reduced to 42,000 men, no trade with Britain was allowed and Berlin had to pay Paris high reparations and fund the French army of occupation. Saxony changed sides to support Napoleon and joined the Confederation of the Rhine. Ruler Frederick Augustus I was rewarded with the title of king and given a slice of Poland taken from Prussia. After Napoleon's military fiasco in Russia in 1812, Prussia allied with Russia in the Sixth Coalition. A series of battles followed and Austria joined the alliance. Napoleon was decisively defeated in the Battle of Leipzig in late 1813. The German states of the Confederation of the Rhine defected to the Coalition against Napoleon, who rejected any peace terms. Coalition forces invaded France in early 1814, Paris fell and in April Napoleon surrendered. Prussia as one of the winners at the Congress of Vienna, gained extensive territory. In 1815 continental Europe was in a state of overall turbulence and exhaustion, as a consequence of the French Revolutionary and Napoleonic Wars. The liberal spirit of the Enlightenment and Revolutionary era diverged toward the Romanticism of Edmund Burke, Joseph de Maistre and Novalis. The victorious members of the Coalition had negotiated a new peaceful balance of powers in Vienna and agreed to maintain a stable German heartland that keeps French imperialism at bay.