It was part of the rearrangement from the Congress of Vienna, iirc.
The Treaty of Fredrikshamn or the Treaty of Hamina (Finnish: Haminan rauha, Swedish: Freden i Fredrikshamn) was a peace treaty concluded between Sweden and Imperial Russia on
17 September 1809.
Original text (sorry find only in russian): "...В устье р. Торнео, острова Бьоркио, порт Риодгам и полуостров, на котором лежит гор. Торнео, будут самыми дальними пунктами Российских владений и граница простираться будет
вдоль р. Торнео (Tornio River), до соединения обоих рукавов сей реки близ чугунного завода Кенгис, откуда граница пойдет по течению р. Муонио (Muonio River), мимо Муониониски, Муониоефреби, Палоиоиса, Кютане, Енонтекиса, Келоттиерва, Петтико, Нюймакки, Раунулы и Кильписьярви, даже до Норвегии..." (
http://www.hrono.ru/dokum/rusv1809.html)
...
According to the treaty Sweden ceded parts of the provinces Lappland and Västerbotten (
east of Tornio River and Muonio River), Åland, and all provinces east thereof.
The Treaty shall enter into force after the exchange of documents of ratification, which took place on
1 (13) October 1809 in St. Petersburg.