Immediately after the German invasion of Poland in 1939, which marked the beginning of World War II, the Soviet Union invaded the eastern regions of the Second Polish Republic, which Poles referred to as the "Kresy", and annexed territories totaling 201,015 square kilometres (77,612 sq mi) with a population of 13,299,000 inhabitants including Belarusians, Ukrainians, Poles, Jews, Czechs and others.
Most of these territories remained within the Soviet Union in 1945 as a consequence of European-wide territorial rearrangements configured during the Tehran Conference of 1943. Poland was compensated for this territorial loss with the prewar German eastern territories much of which had been devastated during the war, and had been looted and pillaged by the Red Army. Communist Poland described the territories as the "Recovered Territories". The number of Poles in the Kresy in the year 1939 was around 5.274 million, but after ethnic cleansing in 1939-1945 by the Nazi Germany, Soviet Union and Ukrainian nationalist forces consisted of approximately 1.8 million inhabitants. The post-World War II territory of Poland was significantly smaller than the pre-1939 land areas, shrinking by some 77,000 square kilometres (30,000 sq mi) (roughly equaling that of the territories of Belgium and the Netherlands combined).
Early in the morning of August 24, 1939, the Soviet Union and Nazi Germany signed a 10-year non-aggression pact, called the Molotov–Ribbentrop pact. Most notably, the pact contained a secret protocol, revealed only after Germany's defeat in 1945, according to which the states of Northern and Eastern Europe were divided into German and Soviet "spheres of influence". In the North, Finland, Estonia and Latvia were assigned to the Soviet sphere. Poland was to be partitioned in the event of its "political rearrangement"—the areas east of the Narev, Vistula and San Rivers going to the Soviet Union while Germany would occupy the west. Initially annexed by Poland in a series of wars between 1918 and 1921 (primarily the Polish-Soviet War), these territories had mixed urban national populations with Poles and Ukrainians being the most numerous ethnic groups, with significant minorities of Belarusians and Jews. Much of this rural territory had its own significant local non-Polish majority (Ukrainians in the south and Belarusians in the North).
Lithuania, adjacent to East Prussia, would be in the German sphere of influence, although a second secret protocol agreed in September 1939 assigned majority of Lithuania to the USSR. According to the secret protocol, Lithuania would retrieve its historical capital Vilnius, subjugated during the inter-war period by Poland.
The Polish–Soviet border, as of 1939, had been determined in 1921 at the Treaty of Riga peace talks, which followed the Polish–Soviet War. Under the terms of the Molotov–Ribbentrop Pact, two weeks after the German invasion of western Poland the Soviet Union invaded the portions of eastern Poland assigned to it by the Pact, followed by co-ordination with German forces in Poland. (see map)
The "need to protect" the Ukrainian and Belarusian majority populations was used as a pretext for Soviet invasion of Eastern Poland (including Western Ukraine and Belarus) carried out in the wake of Poland's dismemberment under the Nazi invasion with Warsaw being besieged and Poland's government being in the process of evacuation. The total area, including the area given to Lithuania, was 201,015 square kilometres (77,612 sq mi), with a population of 13.299 million, of which 5.274 million were ethnic Poles and 1.109 million were Jews. An additional 138,000 ethnic Poles and 198,000 Jews fled the German occupied zone and became refugees in the Soviet occupied region.
Soviet authorities immediately started a campaign of sovietization of the newly acquired areas. The Soviets organized staged elections, the result of which was to become a legitimization of Soviet annexation of eastern Poland. Soviet authorities attempted to erase Polish history and culture, withdrew the Polish currency without exchanging ruble, collectivized agriculture, and nationalized and redistributed private and state-owned Polish property. Soviet authorities regarded service for the pre-war Polish state as a "crime against revolution" and "counter-revolutionary activity", and subsequently started arresting large numbers of Polish citizens. During the initial Soviet invasion of Poland, between 230,000 to 450,000 Poles were taken as prisoner, some of whom were executed. NKVD officers conducted lengthy interrogations of the prisoners in camps that were, in effect, a selection process to determine who would be killed. On March 5, 1940, pursuant to a note to Stalin from Lavrenty Beria, the members of the Soviet Politburo (including Stalin) signed an order to execute 25,700 Polish POWs, labeled "nationalists and counterrevolutionaries", kept at camps and prisons in occupied western Ukraine and Belarus. This became known as the Katyn massacre.
During 1939–1941 1.450 million of the people inhabiting the region were deported by the Soviet regime, of whom 63.1% were Poles, and 7.4% were Jews. Previously it was believed that about 1.0 million Polish citizens died at the hands of the Soviets, however recently Polish historians, based mostly on queries in Soviet archives, estimate the number of deaths at about 350,000 people deported in 1939–1945.
Territories around Wilno (now Vilnius) annexed by Poland in 1920, were transferred to Lithuania on the basis of Lithuania-Soviet Union agreement (however Lithuania was soon annexed by Soviet Union to become the Lithuanian SSR). Other northern territories were attached to Belastok Voblast, Hrodna Voblast, Navahrudak Voblast (soon renamed to Baranavichy Voblast), Pinsk Voblast and Vileyka (later Maladzyechna) Voblast in Byelorussian SSR. The territories to the south were transferred to the Ukrainian SSR : Drohobych Oblast, Lviv Oblast, Rivne Oblast, Stanislav (later known as Ivano-Frankivsk) Oblast, Tarnopil Oblast and Volyn Oblast.
These areas were conquered by Nazi Germany in 1941 during Operation Barbarossa. The Nazis divided them up as follows:Bezirk Białystok (district of Białystok), which included the Białystok, Bielsk Podlaski, Grajewo, Łomża, Sokółka, Vaukavysk, and Hrodna counties and was "attached to" (not incorporated into) East Prussia;
Generalbezirk Litauen — the Vilna Province was incorporated into Lithuania, itself incorporated into the Reichskommissariat Ostland;
Generalbezirk Weißruthenien — most of the Polish part of White Ruthenia (the western section of modern-day Belarus) was incorporated into the Reichskommissariat Ostland;
Generalbezirk Wolhynien und Podolien — the Polish provinces of Volhynia and Polesie, which was incorporated into the Reichskommissariat Ukraine; and
District Galicia, East Galicia, which was incorporated into the General Government and became its fifth district.
During 1943–1944 ethnic cleansing operations took place in Ukraine (commonly known as the Massacres of Poles in Volhynia) which brought about an estimated 100,000 deaths and an exodus of ethnic Poles from this territory.
The Polish and Jewish language population of the regions in 1939 totaled about 6.7 million. During the war, an estimated 2 million persons perished (including 1.2 million Jews). These numbers are included with Polish war losses. 2 million (including 250,000 Jews) became refugees to Poland or the West, 1.5 million were in the territories returned to Poland in 1945 and 1.2 million remained in the USSR. Contemporary Russian historians also include the war losses of Poles and Jews from this region with Soviet war dead.
At the end of World War II, the Soviet Union annexed most of the territories it had invaded in 1939. Some parts of eastern Poland occupied by the Nazis in 1939 with an area of 21,275 square kilometres (8,214 sq mi) and 1.5 million inhabitants near Białystok and Przemyśl were returned to postwar Poland. The Western Allies were unaware of the existence of the secret clause dividing Poland between Hitler and Stalin already in 1939 along the Curzon Line.
Soon after the Soviet re-entry to Poland in July 1944 in pursuit of the German army, the Polish prime minister from London flew to Moscow along with Churchill in an attempt to prevent the Soviet annexation of Poland in accordance with the Molotov–Ribbentrop Pact signed by the Soviet Union. He offered a smaller section of land, but Stalin declined, telling him that he would allow the exiled government to participate in the Polish Committee of National Liberation. An agreement between the Allies was reluctantly reached at the Yalta Conference where the Soviets would annex the entirety of their Molotov–Ribbentrop Pact portion of Eastern Poland, but would grant Poland part of Eastern Germany in return. Thereafter, eastern Poland was annexed into the Ukrainian Soviet Socialist Republic and the Byelorussian Soviet Socialist Republic.
On August 16, 1945 the Communist-dominated Polish government signed a treaty with the USSR to formally cede these territories. The total population of the territories annexed by the USSR, not including the portion returned to Poland in 1945, had an estimated population of 10,653,000 according to the 1931 Polish census. In 1939 this had increased to about 11.6 million. The composition by language group was Ukrainian 37.1%, Polish 36.5%, Belarusian 15.1%, Yiddish 8.3%, Other 3%. Religious affiliation: Eastern Orthodox 31.6%, Roman Catholic 30.1%, Ukrainian Greek Catholic Church 26.7%, Jewish 9.9%, Other 1.7%.
From 1944 until 1952 the Ukrainian Insurgent Army (UIA) were engaged in an armed struggle against the communists (in the early 1940s, the UIA, supported by local Ukrainian peasants, participated in the ethnic cleansing operations). As a result of the skirmishes between the UIA and Soviet units, the Soviets deported 600,000 people from these territories and in the process 170,000 of the local population were killed in the fighting (See also Operation Vistula).