During the German invasion of Poland, which started World War II, the "Einsatzgruppe III" entered the town on September 6-7, 1939, to commit various crimes against Poles. During the subsequent German occupation it was annexed directly to Nazi Germany, and was administered within the newly formed province of Reichsgau Wartheland. Most of the Polish inhabitants were expelled. Germany operated the Stalag XXI-A prisoner-of-war camp in various buildings throughout the town from September 1939. Initially 12,000 Polish prisoners of war and civilians were imprisoned in the camp. Also Franciscans from Niepokalanów were held there, including Maximilian Kolbe, who was later killed in the Auschwitz concentration camp and is now considered a saint of the Catholic Church. From 1940 Polish, French and English POWs were held in the camp and in 1942 also Yugoslavs. In 1943 the camp was converted to Oflag XXI-C for 1,130 Norwegian officers, but also for Dutch, Italian, Serbian and Soviet POWs. The Germans also operated a Nazi prison in the town from 1942 to 1944. Shortly before retreating, on January 20, 1945, the Germans carried out a massacre of 14 Poles in the town, and the next day Soviet forces captured the town, which was then restored to Poland.