The first Jew said to have settled on Finnish soil was Jacob Weikam, later Veikkanen, in 1782, in the town of Hamina, which was at that point under Russian rule. During that time, most of Finland was included in the Kingdom of Sweden. In Sweden, Jews were allowed to reside in a few towns—all of them outside the territory that is now modern-day Finland. In 1809 Finland became part of the Russian Empire, as an autonomous Grand Duchy, but Swedish laws remained in force, meaning Jews were still unable to settle in Finnish territory according to the Judereglementet.