In interest of re-establishing Swedish dominance in the Baltic Sea, Sweden allied itself against its traditional ally and benefactor, France, in the Napoleonic Wars. However, in 1810, a French Marshal, Jean-Baptiste Bernadotte, was chosen as heir presumptive to the decrepit Charles XIII; in 1818, he established the House of Bernadotte, taking the regnal name of Charles XIV. Sweden's role in the Battle of Leipzig gave it the authority to force Denmark–Norway, an ally of France, to cede Norway to the King of Sweden on 14 January 1814 in exchange for the northern German provinces, at the Treaty of Kiel. The Norwegian attempts to keep their status as a sovereign state were rejected by the Swedish king, Charles XIII. He launched a military campaign against Norway on 27 July 1814, ending in the Convention of Moss, which forced Norway into a personal union with Sweden under the Swedish crown, which lasted until 1905. The 1814 campaign was the last time Sweden was at war.