On 22 June 1941, contravening the Molotov–Ribbentrop Pact of 1939, over three million Axis troops attacked the Soviet Union. This offensive (codenamed Operation Barbarossa) was intended to destroy the Soviet Union and seize its natural resources for subsequent aggression against the Western powers. The invasion conquered a huge area, including the Baltic republics, Belarus, and West Ukraine. By early August, Axis troops had advanced and won the Battle of Smolensk. Hitler ordered Army Group Centre to temporarily halt its advance to Moscow and divert its Panzer groups to aid in the encirclement of Leningrad and Kiev. His generals disagreed with this change, having advanced within of Moscow, and his decision caused a crisis among the military leadership. The pause provided the Red Army with an opportunity to mobilise fresh reserves; historian Russel Stolfi considers it to be one of the major factors that caused the failure of the Moscow offensive, which was resumed in October 1941 and ended disastrously in December. During this crisis, Hitler appointed himself as head of the .