On September 19, 1944, Finland and the Soviet Union signed the Moscow Armistice, ending hostilities between them. The armistice contained the same provisions as the 1940 Moscow Peace Treaty that had ended the Winter War, with some additions. Finland was compelled to cede parts of Karelia and Salla, as well as some islands in the Gulf of Finland, as in the 1940 treaty. In the Moscow Armistice, Finland was also required to grant a 50-year lease right for the Soviets to construct a naval base at Porkkala (the area was returned to Finland in 1956). Other Soviet-imposed stipulations were that Finland pay war reparations to the Soviet Union in the form of commodities for six years, legalize the Finnish Communist Party, ban parties and organizations that were deemed fascist, and arraign Finnish officials “responsible for the war” (the so-called “War-responsibility trials in Finland”; Finnish: Sotasyyllisyysoikeudenkäynti). Finland also had to expel German forces from its territory, leading to the Lapland War (September 1944 – April 1945).
(Taken from The Soviet Counter-offensive – Wars of the 20th Century – World War II in Europe)
In June 1941, Finland had joined Germany in attacking the Soviet Union (albeit not as a member of the Axis) with the aim of regaining lost territory in the Winter War (separate article), and perhaps a secondary motive to gain a little more territory in support of “Greater Finland”. With these objectives, the Finnish Army made no attempt to attack Leningrad from the north, and rejected the urging by the Germans who were positioned west and south of the city.
For Stalin, however, Finland was a German ally, and shared Hitler’s plan to destroy the Soviet Union. By spring 1944, the Finnish Army at Karelia was isolated and in a precarious situation after the Red Army drove back the Germans from Leningrad into the Estonian border. The Soviet High Command then made preparations to knock Finland out of the war, which would also improve the strategic position of the Red Army as it continued its drive to the west.
In June 1944, the Soviet Leningrad and Karelian Fronts, with a combined 550,000 troops, 10,500 artillery pieces, 800 tanks, and 1,600 planes, attacked the Finnish Army (which was outnumbered 2:1 in personnel, 5:1 in artillery, 8:1 in tanks, and 6:1 in planes) in the Karelian Isthmus and eastern Karelia. The Soviets broke through the Finns’ first two defense lines, taking eastern Karelia and Viipuri (Vyborg), and by July 1944, had pushed back the Finns 60 miles (100 km) to the third line (VKT Line). There, the Red Army advance was stopped, with the Finns greatly benefiting from the recently delivered German anti-tank weapons that halted the Soviet armored spearheads.
In late August 1944, Finland feared that its forces could not withstand another major Soviet offensive, and sued for peace. The Soviets accepted, and on September 4, a ceasefire came into effect. Two weeks later, an armistice was signed, where the Soviets imposed harsh conditions which the Finnish government reluctantly accepted, including that Finland pay war reparation, cede territory, lease territory for a Soviet naval base, and force the Germans from Finnish territory. Regarding the last stipulation, the Finns did turn against the Germans, who were still occupying northern Finland.