Latvia states of Northern and Eastern Europe were divided into German and Soviet "spheres of influence". In the north, Latvia, Finland and Estonia were assigned to the Soviet sphere. A week later, on 1 September 1939, Germany and on 17 September, the Soviet Union invaded Poland. After the conclusion of the Molotov-Ribbentrop Pact, most of the Baltic Germans left Latvia by agreement between Ulmanis' government and Nazi Germany under the Heim ins Reich programme. In total 50,000 Baltic Germans left by the deadline of December 1939, with 1,600 remaining to conclude business and 13,000 choosing to remain in Latvia. Most of
Germany–Poland border Treaty of Warsaw, and by reunified Germany, in 1990 in the German–Polish Border Treaty of 1990. It was subject to minor corrections (land swaps) in 1951. The borders were partially open from 1971 to 1980, when Poles and East Germans could cross it without a passport or a visa; it was however closed again after few years, due to economic pressure on the East German economy from Polish shoppers and the desire of the East German government to diminish the influence of the Polish Solidarity movement on East Germany. Following the fall of communism in Poland and Germany, and the