The Bavarians were for several years the active allies of Napoleon, and Wrede led the Bavarian corps that fought in Russia in 1812. Just before the Battle of Leipzig in October 1813, he negotiated the Treaty of Ried between Austria and Bavaria, by which Bavaria switched sides. Wrede then fought with the allies against Napoleon. After Leipzig, he tried to block the French escape at the Battle of Hanau on 30 and 31 October. Upon seeing the Bavarian armies' opening dispositions at the battle, Napoleon is said to have said of Wrede, "I made him a count, but I couldn't make him a general." Wrede positioned his troops poorly and Napoleon smashed one of his wings, inflicting 9,000 casualties. In 1814 he was created prince and field marshal. Wrede represented Bavaria at the Congress of Vienna.