However, not all provisions of the treaty would come into force. Norway declared its independence, adopted a constitution and elected Crown Prince Christian Frederik as its own king. Sweden therefore refused to hand over Swedish Pomerania, which instead passed to Prussia after the Congress of Vienna in 1815. After a short war with Sweden, Norway accepted entering into a personal union with Sweden at the Convention of Moss. King Christian Frederik abdicated after convening an extraordinary Storting, which revised the Constitution to allow for the Union. It was formally established when the Storting elected Charles XIII as king of Norway on 4 November 1814.