The Nazi-Soviet Pact (Molotov-Ribbentrop Pact)
In August 1939, Nazi Germany and the USSR signed the Molotov–Ribbentrop Pact (aka. Nazi-Soviet Pact), which was a non-aggression pact.
The German-Soviet Frontier Treaty was a second supplementary protocol of this pact which was amended on September 28th 1939, agreeing that the two powers would partition Poland between them.
How did this affect Poland?
Poland was shocked that Nazi Germany and Soviet Russia, who had completely opposite political ideologies, had formed a pact together.
They felt cheated on as they had an alliance with Soviet Russia against Nazi Germany.
They were afraid because...
A large area of land was taken from Germany and given to Poland.
Due to the 'Polish Corridor', East Prussia was cut off from it's motherland of Germany.
The Failure of an Anglo-Soviet Alliance
Stalin knew that Hitler’s end goal was to attack Russia. In 1939, he invited the British Foreign Secretary, Lord Halifax, to go to Russia to discuss an alliance against Germany. The British feared Russian Communism, and they believed that the Russian army was too weak to be of any use against Hitler and failed to agree on an alliance with Russia.
There are a number of reasons for this.
One of these was the suspicion between the countries.
Firstly, Chamberlain did not trust Stalin as he was a communist dictator. Additionally, he did not wish to concede to Russia's demand of being allowed to control Estonia, Latvia and Lithuania.
Secondly, Stalin thought that Britain wanted to trick them into a war with Germany to solve their problems of Hitler's extremism and the Soviet's communism. Furthermore, due to the policy of Appeasement, Stalin was convinced that Britain would break it's alliance promise to Poland and leave the USSR fighting Germany alone.
Another reason concerned the invasion of Poland.
On the one hand, Stalin knew that Britain would not be able to send troops to fight in Poland, so they would have to fight a war in Poland on Britain's behalf. Meanwhile, on the other hand, an alliance with Hitler was promising him with peace (at least for the time being), half of Poland and a 'sphere of influence' over Eastern Europe.
Finally, Stalin was put off by the British delay.
At first, Lord Halifax had refused Stalin's offer of a meeting, and when the British actually sent an official, he could not make any decisions. In the end, Stalin got fed up with the British delay.
Why did they sign the pact?
Hitler signed the pact because...
Germany did not believe their military was strong enough to face the USSR, so they wished to gain some time to continue building up their military.
Hitler wished to use the assistance from military capabilities of the USSR to further expand the German Empire to achieve his goal of Lebensraum quickly and gain more supplies/resources/arms to face the allies of Britain & France.
Hitler knew that only Russia could keep Britain's promise of protecting Poland, so he stopped an alliance between them by forming one with Russia himself.
Stalin signed the pact because...
The Alliance with Britain was failing and Stalin needed clear security. He was insulted by Britain's slow negotiation.
Stalin wished to continue to expand the Soviet Union and used the 'secret protocol' to gain spheres of influence in Finland, Estonia, Latvia, Lithuania, Romania and Poland.
Stalin needed time to deal with the situation with Japan and needed to strengthen its military to protect itself from both sides against aggressive Germany & Italy.
Stalin hoped Russia would gain from a long war as Britain, France and Germany would likely exhaust themselves.
What was the impact of the pact?
It allowed Hitler to invade Poland as he knew that Britain couldn't do anything to defend Poland. Also, it temporarily protected him from an attack by the Soviets.
The pact ended the hopes of the British people who believed an alliance with Russia would stop Hitler. They now came to the realisation that nothing but war could stop Hitler now.
It made British people more supportive of war / pro-war as it was evident that Hitler could never be trusted.