The Red Army, which vastly outnumbered the Polish defenders, achieved its targets by using strategic and tactical deception. Some 230,000 Polish prisoners of war had been captured. The campaign of mass persecution in the newly acquired areas began immediately. In November 1939 the Soviet government ostensibly annexed the entire Polish territory under its control. Some 13.5 million Polish citizens who fell under the military occupation were made into new Soviet subjects following mock elections conducted by the NKVD secret police in the atmosphere of terror, the results of which were used to legitimize the use of force. A Soviet campaign of political murders and other forms of repression, targeting Polish figures of authority, such as military officers, police and priests, began with a wave of arrests and summary executions. Over the next year and a half, the Soviet NKVD sent hundreds of thousands of people from eastern Poland to Siberia and other remote parts of the Soviet Union in four major waves of deportation between 1939 and 1941.
Soviet forces occupied eastern Poland until the summer of 1941, when they were driven out by the other invading German army in the course of Operation Barbarossa. The area was under German occupation until the Red Army reconquered it in the summer of 1944. An agreement at the Yalta Conference permitted the Soviet Union to annex almost all of their Molotov–Ribbentrop Pact portion of the Second Polish Republic, compensating the People's Republic of Poland with the southern half of East Prussia and territories east of the Oder–Neisse line. The Soviet Union enclosed most of the conquered annexed territories into the Ukrainian Soviet Socialist Republic and the Byelorussian Soviet Socialist Republic.
After the end of World War II in Europe, the USSR signed a brand new border agreement with the Soviet-backed and installed Polish communist puppet state on 16 August 1945. This agreement recognized the status quo as the new official border between the two countries with the exception of the region around Białystok and a minor part of Galicia east of the San river around Przemyśl, which were returned to Poland later on.
Several months before the invasion, in early 1939 the Soviet Union began strategic alliance negotiations with the United Kingdom, France, Poland, and Romania against the crash militarization of Nazi Germany under Adolf Hitler. The USSR played a double game by secretly engaging in parallel talks with Germany. The negotiations with the Western democracies failed as expected, when the Soviet Union insisted that Poland and Romania give Soviet troops transit rights through their territory as part of a collective security arrangement. The terms were rejected, thus giving Josef Stalin a free hand in pursuing the Molotov–Ribbentrop Pact with Adolf Hitler, signed on 23 August 1939. The non-aggression pact contained a secret protocol dividing Northern and Eastern Europe into German and Soviet spheres of influence in the event of war. One week after the signing of the Molotov–Ribbentrop Pact, German forces invaded Poland from the west, north, and south on 1 September 1939. Polish forces gradually withdrew to the southeast where they prepared for a long defence of the Romanian Bridgehead and awaited the French and British support and relief that they were expecting. On 17 September 1939 the Soviet Red Army invaded the Kresy regions in accordance with the secret protocol.
At the opening of hostilities several Polish cities including Dubno, Łuck and Włodzimierz Wołyński let the Red Army in peacefully, convinced that it was marching on in order to fight the Germans. General Juliusz Rómmel of the Polish Army issued an unauthorised order to treat them like an ally before it was too late. The Soviet government announced it was acting to protect the Ukrainians and Belarusians who lived in the eastern part of Poland, because the Polish state – according to Soviet propaganda – had collapsed in the face of the Nazi German attack and could no longer guarantee the security of its own citizens. Facing a second front, the Polish government concluded that the defence of the Romanian Bridgehead was no longer feasible and ordered an emergency evacuation of all uniformed troops to then-neutral Romania.