After the peace treaties that ended the Great War, the newly created states of the Weimar Republic and the Soviet Union both found themselves outcasts in the international system and gravitated toward each other.
The Treaty of Rapallo (1922) formalized their warming relationship.
Until 1933 the Soviet Union secretly provided training camps for the German Armed Forces.

The coming to power in 1933  of Adolf Hitler and the creation of the Nazi state with its virulent anti-Semitic and anti-communist rhetoric made for extremely hostile propaganda in both directions.
Nazi propaganda, across Europe and Latin America, focused on warnings against Jewish and Bolshevik threats emanating from Moscow.
The Comintern, representing Moscow's international Communist network,  moved to a popular front approach after 1934, allowing the Communists worldwide to cooperate with socialists, intellectuals and workers  on the left in opposing Fascism.
The worldwide left-wing support for the Republicans in the Spanish Civil War (1936–39) proved of enormous aid to the Communist cause.
Germany and the Soviets both sent military forces and advisors into Spain, as did Italy.

The Spanish Civil War was in part a proxy war.
The Nationalists  led by General Francisco Franco and the Republican government fought it out for the control of the country.
Militarily, the Nationalists usually had the upper hand and they won in the end.
Germany sent in the Condor Legion comprising elite air and tank units to the  Nationalist forces.
 The Soviet Union sent military and political advisors, and sold munitions in support of the "Loyalist," or Republican, side.
The Comintern helped Communist parties around the world send volunteers to the International Brigades that fought for the Loyalists.

In August 1939 the two totalitarian states stunned the world by coming to a major agreement, the Molotov–Ribbentrop Pact.
They agreed to invade and partition Poland and divided up Eastern Europe.
The Soviets provided Germany with oil and reversed the anti-Nazi rhetoric of Communist parties around the world.
At the same time, the Soviet and German interests were not reconciled in the Balkano-Danubian region.
Thus, during 1940-1941 hot Soviet-German discussions concerning a new division of the South-Eastern Europe were going on.
On June 1940, Moscow recognized that Slovakia was in the German sphere of influence.
Otherwise, Russian request for the exclusive influence in Romania, Bulgaria and Turkey was rejected by Berlin in November 1940.
After the peace treaties that ended the Great War, the newly created states of the Weimar Republic and the Soviet Union both found themselves outcasts in the international system and gravitated toward each other. The Treaty of Rapallo (1922) formalized their warming relationship. Until 1933 the Soviet Union secretly provided training camps for the German Armed Forces.
The coming to power in 1933  of Adolf Hitler and the creation of the Nazi state with its virulent anti-Semitic and anti-communist rhetoric made for extremely hostile propaganda in both directions. Nazi propaganda, across Europe and Latin America, focused on warnings against Jewish and Bolshevik threats emanating from Moscow. The Comintern, representing Moscow's international Communist network,  moved to a popular front approach after 1934, allowing the Communists worldwide to cooperate with socialists, intellectuals and workers  on the left in opposing Fascism. The worldwide left-wing support for the Republicans in the Spanish Civil War (1936–39) proved of enormous aid to the Communist cause. Germany and the Soviets both sent military forces and advisors into Spain, as did Italy.
The Spanish Civil War was in part a proxy war. The Nationalists  led by General Francisco Franco and the Republican government fought it out for the control of the country. Militarily, the Nationalists usually had the upper hand and they won in the end. Germany sent in the Condor Legion comprising elite air and tank units to the  Nationalist forces.  The Soviet Union sent military and political advisors, and sold munitions in support of the "Loyalist," or Republican, side. The Comintern helped Communist parties around the world send volunteers to the International Brigades that fought for the Loyalists.
In August 1939 the two totalitarian states stunned the world by coming to a major agreement, the Molotov–Ribbentrop Pact. They agreed to invade and partition Poland and divided up Eastern Europe. The Soviets provided Germany with oil and reversed the anti-Nazi rhetoric of Communist parties around the world. At the same time, the Soviet and German interests were not reconciled in the Balkano-Danubian region. Thus, during 1940-1941 hot Soviet-German discussions concerning a new division of the South-Eastern Europe were going on. On June 1940, Moscow recognized that Slovakia was in the German sphere of influence. Otherwise, Russian request for the exclusive influence in Romania, Bulgaria and Turkey was rejected by Berlin in November 1940.
Germany–Russia relations