Estonia has variously been under the control of rulers in Denmark, Sweden, Germany and Russia. It declared independence from Bolshevist Russia in 1918. Under the GermanSoviet Nonaggression Pact between Hitler and Stalin and its Secret Additional Protocol of August 1939 the USSR invaded and occupied Estonia in 1940. The USSR were driven out by Hitler in 1941 but then retook the country in 1944. Estonia formally declared independence again in 1991 and the last Russian troops left in 1994.