In 1440 the town joined the anti-Teutonic Prussian Confederation, and upon its request in 1454 Polish King Casimir IV Jagiellon signed the act of incorporation of the region along with Reszel to Poland, an event that sparked the Thirteen Years' War. In 1455 the Teutonic Knights captured the town and later on, in 1462, ceded their power to the Warmian bishop, who once more in 1464 recognized the Polish King as the rightful ruler of Warmia with Reszel. The incorporation of Reszel to the Kingdom of Poland was confirmed in a peace treaty signed in Toruń in 1466. In the 17th century, the Jesuits came to Reszel and established a college in 1632 and the Polish King John II Casimir Vasa created a scholarship fund for its students.