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
Foreign relations of Latvia Foreign Affairs, Latvia maintains embassies in Argentina, Austria, Belarus, Belgium, Canada, the People's Republic of China, the Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Israel, Italy, Lithuania, Netherlands, Nicaragua, Norway, Poland, Portugal, Russia, South Africa, South Korea, Sweden, Ukraine, the United Kingdom, the United States, and Uzbekistan. It also operates missions to the United Nations in New York City and Geneva, to the European Union, the Chemical Weapons Nonproliferation Organization, the OSCE, NATO, World Trade Organization, and the Food and Agriculture Organization of the United Nations. Latvia has a Consulate General in Russia; Consulates in Belarus and Russia; Honorary