In late 1930s, Soviet Union was no longer satisfied with the status quo in its relations with independent countries of Finland, Estonia, Latvia, Lithuania, Poland and Romania. This came as a result of a change in Soviet foreign policy. The Molotov-Ribbentrop Pact gave a great opportunity to recover the provinces of Imperial Russia lost during the chaos of the October Revolution and the Russian Civil War. As a result of this pact, on 1 September, the Germans invaded Poland from the west. When the Poles were close to defeat and the Polish government left the country, on 17 September the Red Army invaded Poland from the east to regain the territories populated mostly by ethnic Belarusians and Ukrainians.