In the Winter War of 1939–1940, the Soviet Union invaded neutral Finland and annexed some of its territory. From 1941 until 1944, Finland aligned itself with Nazi Germany in a failed effort to regain lost territories from the Soviets. Finland retained its independence following the war but remained subject to Soviet-imposed constraints in its domestic affairs.