[5] In 1440 the town joined the Prussian Confederation, which opposed Teutonic rule,[6] and upon the request of which King Casimir IV Jagiellon re-incorporated the territory to the Kingdom of Poland in 1454.
It was reintegrated with Poland, the castle became the seat of the local starosts[7] and the next year the Teutonic Knights renounced any claims to the town.
[8] In 1772, after the First Partition of Poland, the town, as Neuenburg, was annexed by the Kingdom of Prussia and was subject to Germanisation policies, however, in the late 19th century it was still mainly populated by Poles.
[10] From 1871 it formed part of Germany, within which it belonged to Kreis Schwetz in the administrative region of Regierungsbezirk Marienwerder in the Prussian Province of West Prussia.
After the German invasion of Poland, which started World War II in September 1939, it was occupied and annexed by Nazi Germany, into its newly formed province of Reichsgau Danzig-West Prussia.
[12] The Germans established a prison in the local courthouse, in which around 200 Poles were imprisoned and tortured in September and October 1939, before being murdered in large massacres in the nearby village of Grupa.