Towards the end of the Napoleonic Wars and during the Treaty of Keil in 1814, Denmark agreed to cede Norway. This gave the Norwegians the opportunity to establish their own parliament. May 17th, Syttende Mai, is still celebrated as Norwegian Constitution Day. However, a few months later during the Convention of Moss, they were forced into a Swedish union and were technically ruled by Charles XIII of Sweden. One of the conditions was they were allowed to maintain many provisions of their new constitution. So the parliament proceeded to meet in temporary facilities until the Storting building was finished in 1866.