The Swedish–Norwegian War begins.
As early as in 1812, prior to the Napoleonic invasion of Russia, the Swedish Crown Prince Charles John had entered into an agreement with Tsar Alexander I that Russia would support a Swedish attack on Norway in order to force Denmark-Norway to cede its northern part to Sweden. The Swedish attack against Norway was rejected, however, Swedish forces were instead directed against France in Central Europe. The Swedish troops were deployed against Napoleon’s forces as a result of agreements between Charles John and diplomats from the United Kingdom and Prussia, which indicated that Norway would be ceded to Sweden after France and its allies which included Denmark-Norway were defeated.
By the Treaty of Kiel in January 1814, King Frederik VI of Denmark-Norway had to cede Norway to the King of Sweden, due to Denmark-Norway’s alliance with France, and its defeat during the later phases of the Napoleonic Wars. This treaty was however not accepted by the Norwegians.
Norwegian Constituent Assembly
Prince Christian Frederick of Denmark, heir presumptive to the thrones of Denmark and Norway and Governor-general of Norway, took the lead in the insurrection, and he called for a constitutional assembly. This adopted the liberal constitution of 17 May, which also elected Christian Frederick as the king of an independent Norway.
As the head of the new state, Christian Frederick desperately tried to gain support from the United Kingdom, or any of the other major powers within the Sixth Coalition, in order to maintain Norway’s independence. However, the foreign diplomats gave no hope for any outside support to the Norwegians.
The hostilities opened on 26 July with a swift Swedish naval attack against the Norwegian gunboats at Hvaler. The Norwegian army was evacuated and the vessels managed to escape, but they did not take part in the rest of the war. The main Swedish offensive came across the border at Halden, bypassing and surrounding the fortress of Fredriksten, and then continuing north, while a second force of 6,000 soldiers landed at Kråkerøy outside of Fredrikstad. This town surrendered the next day. This was the start of a pincer movement around the main part of the Norwegian army at Rakkestad.
On the front towards Kongsvinger the forces were more evenly matched, and the Norwegian army eventually stopped the Swedish advance at Lier on 2 August, and won another victory at Matrand on 5 August. On 3 August, King Christian Frederick reached the front at Østfold and was persuaded to change his strategy and use the 6,000 men stationed at Rakkestad in a counterattack against the Swedes. The order to counterattack was given on the 5th of August, but the order was recalled a few hours later. The Norwegian forces therefore withdrew over the Glomma river at Langnes in Askim. The last major battle of the war was fought on 9 August at the bridgehead at Langnes, where the Swedish forces once more were driven back. Sweden then attempted to outflank the Norwegian line, and successfully did so during the battle of Kjølberg Bridge on the 14th of August. The Swedes then had a clear path to Kristiania, the Norwegian capital, which made the Norwegian situation unsustainable.
Although the Norwegian Army had won at Langnes, it was nevertheless clear to both the Norwegian and Swedish military authorities that a defeat was inevitable. Even as they had managed to deliver several minor offensive blows to the Swedes, thus applying pressure on the Swedes to accept Norway as a sovereign nation, it was considered impossible to try to stop the Swedes in the long run. The Swedish offer of negotiations was therefore accepted as the war had put a heavy strain on the Norwegian finances. Every day of delay in securing Norway by the Swedes brought uncertainty to them regarding the outcome, so both parties were interested in a quick end to the war.
For the ordinary Norwegian soldier the war had seemed ill-prepared and ill-fought. The allegations of the loss were against Christian Frederick and the Norwegian general Haxthausen; the latter was accused of treason. For the Norwegian government it probably[citation needed] had been more of a matter of getting the best possible bargaining position, as without the support of major powers Norway’s independence was impossible to secure. But by agreeing to talks following the victory at Langnes they were in a situation where they could avoid an unconditional surrender.