In the night of 23-24 August 1939, Germany and the Soviet Union signed a non-aggression pact., known as the Molotov-Ribbentrop Pact.
The countries agreed that they would not attack each other and secretly divided the countries that lay between them. Germany claimed Western Poland and part of Lithuania. The Soviet Union was going to occupy Eastern Poland, the Baltic States and part of Finland.
One week later, Germany invaded Poland and two weeks later, the Soviet Union attacked Poland in the east.