The Soviet invasion of Poland was a Soviet military operation that started without a formal declaration of war on 17 September 1939. On that morning, 16 days after Germany invaded Poland from the west, the Soviet Union invaded Poland from the east. The invasion and the battle lasted for the following 20 days and ended on 6 October 1939 with the two-way division and annexation of the entire territory of the Second Polish Republic by both Germany and the Soviet Union. The joint German-Soviet invasion of Poland was secretly agreed to following the signing of the Molotov-Ribbentrop Pact on 23 August 1939.
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 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 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 Polish communists 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.