The military history of the Soviet Union began in the days following the 1917 October Revolution that brought the Bolsheviks to power. In 1918 the new government formed the Red Army, which then defeated its various internal enemies in the Russian Civil War of 1917–22. The years 1918–21 saw defeats for the Red Army in the Polish–Soviet War (1919–21) and in independence wars for Estonia (1918–20), Latvia (1918–20) and Lithuania (1918–19). The Red Army invaded Finland (November 1939); fought the Battle of Halhin Gol of May-September 1939 (together with its ally Mongolia) against Japan and its client state Manchukuo; it was deployed when the Soviet Union, in agreement with Nazi Germany, took part in the invasion of Poland in September 1939, and occupied the Baltic States (June 1940), Bessarabia (June–July 1940) and Northern Bukovina (June–July 1940) (from Romania). In World War II the Red Army became a major military force in the defeat of Nazi Germany and conquered Manchuria. After the war, it occupied East Germany and many nations in central and eastern Europe, which became satellite states in the Soviet bloc.