The area that today is Finland was an integral part of Sweden proper from the Middle Ages to the end of the Finnish War in 1809. Swedish migrants settled in coastal areas, and the language of administration was Swedish. This prompted many Finnish-speakers to learn Swedish in hopes of improving their social status, with some switching to Swedish altogether.