The Soviet Army was considerably weaker and underprepared for war, especially compared to that of Germany, as a result of Stalin's purges of the military. Stalin needed to form a mutual defence pact with Hitler to not only gain time to fully mobilise the Red Army, but also to extend Soviet territory into Eastern Europe to defend Russia's western frontier, home to its agriculture and industry, necessary for a war effort. Nazi Germany also agreed to the pact as the guarantee of peace secured their eastern border, allowing an extension of their territory into western Poland and Scandinavia. This allowed them to focus solely on their attack on France, enabling them to avoid a repeat of a war on two fronts, as happened during the First World War, with the Schlieffen Plan .