According to the Moscow Peace Treaty that ended the Winter War between Finland and the Soviet Union (November 1940–March 1941), Finland was forced to lease Hangö as a naval base to the Soviet Union for thirty years. Together with a base at Paldiski in Estonia, Hangö closed off the Gulf of Finland. The Finns yielded Hangö at midnight on 22 May 1940. About 8,000 inhabitants lost their homes.
When war resumed between Finland and the Soviet Union in the Continuation War beginning in July 1941, Hangö saw many small battles. No major operations occurred as the Soviets withdrew on 2 December 1941. The town was left heavily mined, which resulted in considerable damage. On 8 December 1941 Hangö was reincorporated into Finland. Under the terms of the Finnish-Soviet Armistice of 19 September 1944 and the subsequent Peace Treaty of 10 February 1947, the Soviets gave up their claims to Hangö in favor of the Porkkala peninsula, situated closer to Helsinki. Following World War II, Hangö lost much of its military importance. Today only the neighboring island of Russarö is fortified and employed for surveillance and defense of the Gulf of Finland.
Vehvilainen, Olli. Finland in the Second World War: Between Germany and Russia. London: Palgrave, 2002.