Charles John forced the Danish king to cede Norway to Sweden after the War of the Sixth Coalition, leading to the Swedish-Norwegian war of 1814 where Norway was defeated after a single summer's conflict. This put Norway into a union with Sweden, which lasted for almost a century before being peacefully dissolved in 1905. The Swedish-Norwegian war of 1814 is credited as Sweden's last direct conflict and war.