In 1814,
Denmark–Norway was on the losing side in the
Napoleonic Wars. Under the
Treaty of Kiel, negotiated on 14 January 1814, Norway was ceded to the king of Sweden, of the new
House of Bernadotte. In an attempt to take control of their destiny, the Norwegians convened a
constitutional assembly at
Eidsvoll and, on 17 May 1814, signed the
Constitution of Norway. The viceroy and heir to the thrones of Denmark and Norway, Prince
Christian Frederik, was elected by the assembly as king. The
de facto Swedish ruler, Crown Prince
Charles John, acting on behalf of King
Charles XIII of Sweden, rejected the premise of an independent Norway and launched a military campaign on 2 July 1814 with an attack on the
Hvaler islands and the city of
Fredrikstad. The Swedish army was superior in numbers, better equipped and trained and was led by one of Napoleon's foremost generals, the newly-elected Swedish crown prince,
Jean Baptiste Bernadotte. The hostilities opened on 26 July with a swift Swedish naval attack against the Norwegian gunboats at Hvaler. The Norwegian vessels managed to escape, but they did not take part in the rest of the war. The main Swedish thrust came across the border at Halden, bypassing and surrounding the fortress of Fredriksten, and then continuing north, and a second force of 6,000 soldiers landed at Kråkerøy, outside of Fredrikstad. The town surrendered the next day. That was the start of a pincer movement around the main part of the Norwegian army at Rakkestad. The Norwegian army delivered several offensive blows to the Swedes, thus applying pressure on the Swedes to accept Norway as a sovereign nation and to open up negotiations. The tactic worked, and when talks began on 7 August, Charles John accepted the democratic Norwegian constitution. Armistice negotiations were concluded by Norway at
Moss on 14 August 1814 and by Sweden in the city of
Fredrikstad on 15 August 1814. ==Terms ==