[4] Along with the Treaty of Nystad three years later, the death of Charles XII marked the end of the imperial era in Sweden, and the beginning of the Age of Liberty (Swedish: Frihetstiden) in that country.
At the close of the Great Northern War, the Norwegian Army had been weakened in early 1716 by withdrawal of 5000 of the best troops to Denmark.
When rumors reached Christiania (now Oslo) that Charles XII was preparing to invade, all remaining troops in Østerdal and Gudbrandsdal were ordered to the border at Halden and Fredrikstad.
His troops took the town after fierce fighting, but the citizens set fire to their own houses, forcing Charles, unable to take the fortress, to retreat and await the arrival of heavy siege guns.
The Frederiksten garrison, of between 1,400 and 1,800 men, fought ferociously to hold back the besieging force of some 5,000–6,000 Swedes under the personal command of their king.