 In August 1939 , Germany and the Soviet Union signed a non @-@ aggression pact in Moscow known as the Molotov – Ribbentrop Pact shortly before the German invasion of Poland that triggered the outbreak of World War II in Europe . A secret protocol to the pact outlined an agreement between Germany and the Soviet Union on the division of the eastern European border states between their respective " spheres of influence " : the Soviet Union and Germany would partition Poland in the event of an invasion by Germany , and the Soviets would be allowed to overrun the Baltic states and Finland . On 23 August 1939 the rest of the world learned of the pact between the Nazis and the Soviets but were unaware of the provisions to partition Poland . The conclusion of this pact was indeed followed by a Soviet invasion of Poland that led to the annexation of the eastern part of the country . The pact stunned the world because of the parties ' earlier mutual hostility and their conflicting ideologies . As a result of the pact , Germany and the Soviet Union maintained reasonably strong diplomatic relations for two years and fostered an important economic relationship . The countries entered a trade pact in 1940 by which the Soviets received German military equipment and trade goods in exchange for raw materials , such as oil and wheat , to help the Nazis circumvent a British blockade of Germany . 
