As a result of the First Partition of Poland in 1772 it was annexed by the German state of Prussia.
[1] On September 1, 1939, the day Germany invaded Poland, causing World War II, the Germans murdered the local Polish customs inspector.
During the war, a subcamp of the Stutthof concentration camp was operated by the Germans in the town.
[3] One of the places where the Germans used the forced labour of Stutthof prisoners was the train station, where there is now a memorial plaque.
After the defeat of Nazi Germany in the war in 1945, the town again became part of Poland.