In September 1939, the Soviet Union, following the Molotov–Ribbentrop Pact with Nazi Germany, occupied eastern Poland after the 1939 invasion of Poland. The former Polish territories referred to as West Belarus were incorporated into the Belarusian SSR, with an exception of the city of Vilnius and its surroundings that were transferred to Lithuania. The annexation was internationally recognized after the end of World War II.