Estonia declared independence on 24 February 1918 and fought a war of independence. The republic existed until 1940 and then was annexed by the Soviet Union. Estonia regained its independence after the dissolution of the Soviet Union in 1991.