In 1812, as the Grand Duchy of Finland three years earlier had been formed within the Russian Empire, Tsar Alexander I incorporated Keksgolm with the rest of Old Finland (Vyborg Governorate) into an autonomous region. Keksgolm was the smallest city in the governorate. Since 1812, Vyborg Governorate was known as the Viipuri Province. In 1917, Finland became independent. The town's growth was boosted by the construction of the St. Petersburg–Hiitola railway in 1917 and by establishing two big saw mills and a big Ab Waldhof Oy's wood pulp mill in 1929. In 1939, Käkisalmi had a population of 5083. Around the town laid the rural municipality of Käkisalmi, with a population of 5,100. Minorities were Orthodox (946 persons), Swedish, Russian, or German. Total population was 11,129 in 1939.