Stalin promoted Marxism–Leninism abroad through the Communist International and supported European anti-fascist movements during the 1930s, particularly in the Spanish Civil War. In 1939, his regime signed a non-aggression pact with Nazi Germany, resulting in the Soviet invasion of Poland. Germany ended the pact by invading the Soviet Union in 1941. Despite suffering enormous losses and numerous defeats in the early stages of the conflict, the Soviet Red Army ultimately repelled the German invasion and captured Berlin in 1945, thereby ending World War II in Europe. In the process of defeating Germany and its allies, the Soviets annexed the Baltic states and established Soviet-aligned governments throughout Central and Eastern Europe, China, and North Korea.