During the joint German-Soviet invasion of Poland, which started World War II in September 1939, the town was invaded and then occupied by Germany until 1945. The Polish population was subjected to an extensive genocidal campaign. In September 1939, a German police prison was established in the town, and in October 1939, the German police and "Selbstschutz" carried out mass arrests of local Poles. Hundreds of arrested Poles were interrogated and then murdered on the spot and buried in nearby Skrwilno, during the German-perpetrated "Intelligenzaktion". Among the victims were 96 Polish teachers and school principals from the town and county. Many local Poles were also murdered during large massacres carried out by the Germans in Skrwilno in October and November 1939. In 1944 the occupiers burned the victims' bodies in attempt to cover up the crime committed in Skrwilno. Poles were also murdered in other places in Rypin, and around 200 Poles from the town and county were massacred in the nearby village of Rusinowo. In 1939–1942, the Germans also expelled over 5,100 Poles from the town. Most of the expelled Poles were imprisoned in a transit camp in Toruń and then deported to the General Government (German-occupied central Poland), as their houses were handed over to German colonists as part of the "Lebensraum" policy. According to a "Gestapo" document from 1942, many remaining Poles fled from Rypin trying to avoid signing to the "Deutsche Volksliste", however, many Poles eventually signed under the threat of deportation to German concentration camps. A transit camp for Poles expelled from nearby villages in 1942 was operated in the town.