 However, negotiations were continued in order to, at the very least, buy time and permit the Soviets to secure the Soviet–German border through expansion and pressure on strategically important states perceived as possible German allies in a future war.The signing of the Molotov–Ribbentrop pact gave the USSR freedom to, in its view, preempt hostile action from nations along its Western border.The invasion in the Barbarossa campaign of 1941 came earlier than expected to the Soviet leadership, resulting in the catastrophic loss of over 4 million Soviet soldiers killed or captured.