Poland was invaded and annexed by Nazi Germany and the Soviet Union in the aftermath of the invasion of Poland in 1939. In the pre-war Polish territories annexed by the Soviets (modern-day western Ukraine, Western Belarus, Lithuania and Białystok regions, known to Poles as "Kresy") the first Soviet partisan groups were formed in 1941, soon after Operation Barbarossa, the German invasion of the Soviet Union. Those groups fought against the Germans, but conflicts with Polish partisans were also common. Early war Initially the Soviet partisan groups were formed primarily in the areas of Nowogródek (modern Navahrudak), Lida and Wilno (modern Vilnius) from Red Army soldiers who evaded capture by the advancing German forces. Lacking support from the local population, the Soviet partisan groups retreated to various large forest complexes in the area, where they hid from the German rear and anti-partisan units. There were also Soviet-affiliated and controlled groups, namely Gwardia Ludowa, later transformed into Armia Ludowa, which while often described as parts of the Polish resistance, were de facto controlled by Soviets, and as such can also be seen as extensions of the Soviet partisans. By the end of July 1944 (when much of Poland had been occupied by the Red Army) Armia Ludowa had some 20,000–30,000 members, 5,000 of them being Soviet nationals. Until early 1943, the Soviet partisans focused primarily on survival deep behind enemy lines, with their activity limited mostly to sabotage and diversion rather than armed struggle against German forces and collaborationist police units. During this early period various Soviet partisan groups also collaborated with the local Polish resistance of ZWZ, later renamed the AK. The Polish underground was established in the area in the fall 1939. Polish resistance was both anti-Nazi and anti-Soviet; their attitude represented the fact that both powers had invaded Poland, and Polish citizens suffered from Soviet terror just as they did from Nazi terror. There was no love lost between Polish and Soviet resistances, as Joseph Stalin's goal was to prevent a reemergence of an independent Poland after the war. Late war As the eastern front approached the area, and diplomatic relations between the Polish government in exile and the Soviet Union were broken off in the aftermath of the discovery of the Katyn Massacre in April 1943, most of the collaboration between Polish and Soviet partisans came to an end. In addition, as ordered by Moscow on June 22,