Until the Winter War and Continuation War, it had been the administrative center of the Johannes municipality of the Viipuri Province of Finland. The territory had been ceded by Finland to the Soviet Union by the Moscow Peace Treaty as a result of the Winter War. It was recaptured by Finns between 1941 and 1944 during Continuation War but was again ceded to Soviets after Moscow Armistice. This secession was formalized after signing Paris Peace Treaty in 1947. The Viipuri Province was divided, with the larger part ceded to Soviet Union and the smaller part remaining in Finland. The population was resettled to Finland, and population from Central Russia was resettled to populate the Karelian Isthmus.