The Grand Duchy of Frankfurt was a German state of Napoleonic creation. It came into existence in 1810 through the combination of the former territories of the Archbishops of Mainz along with the city of Frankfurt itself. The former Archchancellor, Karl Theodor von Dalberg, became Grand Duke, although the territory was actually ruled by French commissioners. By the constitution of the Grand Duchy, upon the Archchancellor's death, the Grand Duchy would be inherited by Napoleon's stepson, Eugene de Beauharnais. The Grand Duchy ceased to exist after December 1813, when the Archchancellor abdicated and the city was occupied by allied troops following Napoleon's defeat at the Battle of Leipzig. While Frankfurt itself once again became a free city, most of the territory of the Grand Duchy was ultimately annexed by Bavaria.