In 1939, the Molotov–Ribbentrop Pact between Nazi Germany and the Soviet Union resulted in the invasion of Poland by the two powers and its division between them. Slonim was in the area designated by the Pact to fall within the Soviet sphere of influence. The Soviets placed that area within the Byelorussian SSR. Two years later, Germany invaded the Soviets (Operation Barbarossa) and Slonim was captured. The Słonim Jews were herded into the Słonim Ghetto set up at the Na Wyspie neighbourhood across the bridge on the Szczara River. Soon thereafter, 70% of Slonim's Jews had been killed by the "Einsatzgruppen", including 9,000 on 14 November 1941. The second mass murder of 8,000 Jews took place in 1942. In 1944, on the insistence of Joseph Stalin in Yalta the Soviet Union retained possession of the eastern parts of pre-war Poland including Słonim, as agreed between the Allies. The Polish population was forcibly resettled to new post-war Polish boundaries before the end of 1946.