On 3 April 1440 it became part of the anti-Teutonic Prussian Confederation, upon the request of which Polish King Casimir IV Jagiellon incorporated the region to the Kingdom of Poland in 1454, and the town recognized the Polish King as rightful ruler and joined Poland. In the beginning of the subsequent Thirteen Years' War (1454–1466), the townspeople captured and demolished the Teutonic castle, and in 1456 the town was ravaged and plundered by the Teutonic Knights. The first Polish starost (local royal official) of Tolkmicko was knight Jan Bażyński, leader of the Prussian Confederation, and the remains of the castle became the seat of local starosts since. The Teutonic Knights finally renounced any claims to the town and recognized it as part of Poland in the Second Peace of Thorn (1466), Tolkmicko was since part of the Polish Malbork Voivodeship of the autonomous province of Polish Prussia. It was seat of a county.