to hand over the castle. The confederation asked the King of Poland, Casimir IV Jagiellon to join Poland. The King agreed and signed the act of incorporation in Kraków in March 1454. Although there was support the Knights inside the city walls during the entirety of the war, both the city and the castle remained under Polish control. The 1466 peace treaty confirmed the re-incorporation of Grudziądz to Poland. Between 1454 and 1772 the city was part of the Polish Chełmno Voivodeship, which itself was since 1466 part of the Polish province of Royal Prussia, soon included in the larger Greater Poland Province. The Grudziądz Castle was seat of the local starostas (royal administrative officials). It was often visited by Polish kings. After the great depression of the Thirteen Years' War, new economical growth in the town was slow before the middle of the 16th century. Economic progress was hampered by the religious struggles and by the Polish–Swedish wars throughout the 17th century. At the end of 1655, during the Swedish Deluge, the city and its castle were captured by the Swedes and occupied for four years. In 1659, the Swedes had been besieged for several days and retreated. During their departure, part of the town was destroyed by fire. In 1522, Nicolaus Copernicus, who aside from his astronomical work was also an economist, presented his treatise Monetae cudendae ratio in Grudziądz. In it he postulated the principle that "bad money drives out good" which became known as the Gresham's law or the Gresham–Copernicus law. This work included an early version of the quantity theory of money – a key concept in economics. Following Protestant Reformation, in 1569 the local Protestants were given access to the Holy Spirit Church; in 1572 Catholicism seemed to have vanished almost entirely in the town. In 1597 King Sigismund III Vasa gave order that the Protestants had to return all churches taken over by them in the past to the Catholics, including all accessories. The Protestants remained in possession solely of St. George's Church until in 1618 when the base of the building was washed away by the Vistula River and the church was torn down. For a while, they used once more the vacant Holy Spoirit Church, until in 1624 this building together with the hospital had to be handed over to nuns of the Order of Saint Benedict for the purpose of