Following the Nazi–Soviet Invasion of Poland in 1939, the Polish anti-German resistance movement Armia Krajowa was actively operating on the territory of modern Belarus, although many ethnic Belarusians also actively participated in the movement. Soon after the Soviet invasion of Poland, Poland was divided between Germany and the Soviet Union in accordance with the Molotov–Ribbentrop Pact. The eastern part was incorporated into the USSR following staged elections. Part of this area (West Belarus) was added to the Soviet republic of Belarus.