Estonia declared neutrality at the outbreak of World War II (1939–1945), but the country was repeatedly contested, invaded and occupied, first by the Soviet Union in 1940, then by Nazi Germany in 1941, and ultimately reinvaded and reoccupied in 1944 by the Soviet Union.