In 1258 a city council was created and in 1260 Tczew was granted town rights. It is the only case in Poland for a city council to be established before granting city rights. Craft and trade developed, there was a port on the Vistula and a mint. Duke Mestwin II in 1289 brought the Dominican Order to the city. It was part of Poland until 1308. Following the Treaty of Soldin in 1309, Tczew was purchased from Brandenburg by Heinrich von Plötzke of the Teutonic Knights, despite the fact that the initial claims to the region by Brandenburg were of dubious legality. The townspeople were expelled by the Teutonic Knights and the town's organization ceased to exist for more than half a century. It was rebuilt from 1364 to 1384, and was granted Kulm law by Winrich von Kniprode. After the Polish victory in the Battle of Grunwald in 1410, the town was briefly recaptured by Poland. In 1434 the town was burnt down by the Hussites. In 1440 the town joined the Prussian Confederation, opposing Teutonic Order's rule. In 1457, during the Thirteen Years’ War, Bohemian mercenaries on the Order's service sold Tczew to Poland in lieu of indemnities. The Second Peace of Thorn (1466) confirmed the reincorporation of Tczew to Poland. It became a county seat within the Pomeranian Voivodeship in the newly created Polish province of Royal Prussia, soon also part of the Greater Poland Province of the Polish Crown.