After the signing of the Molotov–Ribbentrop Pact on 23 August 1939, Germany invaded Poland on 1 September 1939,[8][9] and the Soviet Union invaded Poland on 17 September,[8][10] resulting in the occupation of Poland by the Soviet Union and Nazi Germany.[11] The first Gestapo–NKVD meeting took place in Brześć nad Bugiem (Brest) reportedly on 27 September 1939,[1] while some units of the Polish Army were still fighting (see: Invasion of Poland) resulting in mass internment of soldiers and their extrajudicial shootings on both sides of the Curzon Line. At the meeting, the German and Soviet officials reached a mutual agreement about the fate of Polish infantry soldiers captured by the Red Army. Between 24 October and 23 November 1939 a total of 42,492 Polish prisoners of war were transferred from Kozelsk and Putyvl camps across the Nazi-Soviet demarcation line and handed over to the Germans.[11] Both Gestapo and NKVD expected the emergence of Polish resistance and discussed ways of dealing with the clandestine activities of the Poles.