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
Poland–Russia border of the People's Republic of Poland and the Soviet Union, including the Border Agreement between Poland and the USSR of 16 August 1945. While the actual border line remained unchanged following the fall of the Soviet Union, the breakdown of the Soviet Union into a number of post-Soviet states transformed the Poland-Soviet Union border into a Poland-Russia, Poland-Lithuania, Poland-Belarus and Poland-Ukraine border. The Poland–Russia borders were confirmed in a Polish-Russian treaty of 1992 (ratified in 1993). The Poland–Russia border is that between Poland and the Kaliningrad oblast of Russia, which is an exclave, unconnected to the rest of Russia. The