The Finnish War was fought between the Kingdom of Sweden and the Russian Empire from the 21st of February 1808 to the 17th of September 1809.

As a result of the war, the eastern third of Sweden was established as the autonomous Grand Duchy of Finland within the Russian Empire. Other notable effects were the Swedish parliament's adoption of a new constitution and the establishment of the House of Bernadotte, the new Swedish royal house, in 1818.

According to two 2015 studies by political scientists Jan Teorell and Bo Rothstein, Sweden's loss in the Finnish War led to reforms of the Swedish bureaucracy. Prior to 1809, Sweden had a reputation as one of Europe's most corrupt countries, but the loss in the war created the perception of an existential threat in the East for Sweden and motivated Swedish elites to reform its bureaucracy. The motivation behind the reforms were to make the Swedish state more effective and functional, and thus protect against the existential threat in the East.

More Info: en.wikipedia.org