The Soviet Union signed a non-aggression pact with Nazi Germany on 23 August 1939. In addition to stipulations of non-aggression, the treaty included a secret protocol that divided territories of Eastern Europe into German and Soviet “spheres of influence”, anticipating potential “territorial and political rearrangements” of these countries.
In 1940-41 Stalin ignored reports of an Axis invasion. On 22 June 1941, Hitler launched an invasion of the Soviet Union. Stalin was confident that the total Allied war machine would eventually stop Germany, and with Lend Lease from the West, the Soviets stopped the Wehrmacht some 30 kilometers from Moscow. Over the next four years, the Soviet Union repulsed Axis offensives, such as at the Battle of Stalingrad and Battle of Kursk, and pressed forward to victory in large Soviet offensives such as the Vistula-Oder Offensive. Stalin began to listen to his generals more after Kursk.
Stalin met with Winston Churchill and Franklin D. Roosevelt at the Tehran Conference and began to discuss a two-front war against Germany and future of Europe after the war. Berlin finally fell in April 1945, but Stalin was never fully convinced his nemesis Adolf Hitler had committed suicide. Fending off the German invasion and pressing to victory in the East required a tremendous sacrifice by the Soviet Union, which suffered the highest military casualties in the war, losing approximately 20 million men.