 Between 1871 and 1945 the area was part of Germany (province of East Prussia).In the late 19th century the town was slowly declining.Local Jews, whose community existed since the beginning of the 19th century, were imprisoned by the Germans in the Stutthof concentration camp during World War II.