In a sense, the Nazi-Soviet Pact was a brilliant move on Stalin's part, since it gave him an opportunity to drastically improve his country's strategic position along its western border, without getting involved in a larger conflict. While Hitler's Blitzkrieg flattened Poland, Soviet troops took possession of the eastern half of that unlucky country, which Germany and the U.S.S.R. shortly agreed to share. Then, in October of 1939, the U.S.S.R. "convinced" the Baltic States--Lithuania, Latvia, and Estonia, independent since the Revolution--to allow Soviet garrisons to come within their borders. This paved the way for these states' outright annexation to the U.S.S.R. the following year. The Soviets applied similar pressure to Finland, which had been a Grand Duchy under the rule of the Tsars; but the Finns resisted, however, and in November of '39 Stalin ordered an invasion. He expected a quick, easy war, but amid wintry conditions the Red Army (which had, after all, seen its generals purged only a few years before) suffered a series of setbacks. Not until spring of the following year did the Finns capitulate.
By that time, Hitler's armies were racing across France, winning astonishing victories and forcing the French from the war after just a few months of battle. Although the British still remained autonomous on their sea-fenced isle, Nazi Germany stood as the unquestionable master of continental Europe. This left Hitler free to turn on Stalin without fear of attack from the west. But for the next year, while the Nazi leader prepared to launch "Operation Barbarossa" against Russia, Stalin did little to prepare for invasion. Indeed, from the beginning of the Nazi-Soviet pact, the Soviet dictator behaved curiously--he went out of his way to help his new ally, purifying his propaganda of all anti- Fascist rhetoric, eagerly supplying the Germans with raw materials, and even going so far as to return German Communists who had sought sanctuary in the Soviet Union. (These luckless men and women went straight to concentration camps.) All through the spring of 1941, as his subordinates reported that German troops were gathering on the Polish borders, Stalin seems to have convinced himself that these measures did not prefigure war. One might offer a number of reasons for this: Stalin's own anti-Semitism might have made him sympathetic to the Nazis; perhaps he felt an affinity for Hitler as a fellow dictator; he might have seen the stridently anti-bourgeois Nazis as being closer to Marxism than the decadent capitalist Allies. But the simplest explanation is that Stalin, who did not desire war (indeed, he feared it) was indulging in wishful thinking--wishful thinking that no one, in the fear-laced atmosphere of the Soviet Union, dared to question.
(One other event of 1940 is worth noting--the murder, by a pick-axe to the head, of the exiled Trotsky in Mexico City. Stalin had long since come to regret not having killed his rival, and for years his agents had pursued Trotsky across Europe and South America. With Trotsky's death, the last member of Lenin's Politburo--save Stalin, of course--passed from the earth.)
"What have we done to deserve this?" Molotov would ask plaintively on June 21, 1941, when German troops rolled through the U.S.S.R.'s border defenses and poured into the Soviet heartland. Stalin was equally distraught, and when it became clear that his armies were falling back in disorder, and that a counter- attack would fail, he sank into a state of shock that seemed to paralyze him for more than a week, while the invaders drove ever deeper into the Soviet Union. It was not until July 3 that Stalin mustered the willpower to make a national radio address, in which he called for national unity in the face of the crisis. The following month, he officially assumed supreme command of the Red Army, a position he would hold until the end of the war.
But Stalin's leadership was not enough to save his country. Soviet forces had not been mobilized in June of 1941, their equipment was outdated, and their leadership, after the purges, was utterly lacking in experience. By autumn of 1941, they had fallen back all along the vast 2,000-mile front. The Ukraine was in German hands, as was Crimea and the Baltic States; German troops were besieging Leningrad (St. Petersburg had undergone a second renaming after becoming Petrograd during WWI) and Sebastopol. Moscow itself was threatened, and only saved by the onset of winter, when a Red Army counterattack finally halted the German advance. In these months, Stalin began to panic: acting through Lavrenti Beria, one of his chief advisors, he made contact with the Nazis and offered vast territorial concessions in return for peace. The offer was rejected, however, and the war went on. Stalin contemplated fleeing Moscow.
Summer of 1942 marked the low-point for the beleaguered Soviets and their new allies, the British and the Americans, who had been brought into the war after the Japanese attack on Pearl Harbor in December of 1941. While the Germans and Japanese advanced in North Africa and the Pacific, Hitler launched a new offensive into the Caucasus, seeking to capture the oil fields around Baku. Stalin's armies were driven back again, all the way to the city of Tsaritsyn, now renamed Stalingrad, where he had commanded the Red Army during the civil war. But there the tide turned. In a momentous battle, lasting from August 1942 to February of 1943, the Germans suffered a terrible defeat; the Soviets trapped the German troops within the ruins of Stalingrad and annihilated them. Stalin had found a great general in George Zhukov, and now that the military muscle of the United States had joined the war, Germany and Japan were gradually forced to retreat. The Red Army drove the Nazi armies back, out of Russia, and then penetrated into Germany itself, while the Allies invaded France in 1944 and drove eastward. Hitler, his power undone, committed suicide April 31, 1945, effectively ending the fighting in Europe. Four months later, the United States detonated two atomic bombs in Japan, leading to the Japanese surrender and the end of World War II.