French control lasted until October 1813, when the territory was overrun by Russian troops, and the Battle of the Nations at Leipzig later the same month spelled the definitive end to the Napoleonic client state of Westphalia, as well as the entire Confederation of the Rhine, after which the rule of the House of Hanover was restored. The former electorate became the Kingdom of Hanover, confirmed at the Congress of Vienna in 1814.