During World War II the Germans imprisoned French and Norwegian women in the castle, participants of anti-German resistance movements.[6] In the final stages of the war, in early 1945, most of the town's population was evacuated by the Germans.[4] It was captured by the Soviets in February and passed to Poland in April.[4] After the war the region officially became part of Poland again as per the Potsdam Agreement.