In 1440, most of the nobility and towns of Warmia joined the anti-Teutonic Prussian Confederation, upon the request of which the region was incorporated into the Kingdom of Poland in 1454, and in 1464, during the following Thirteen Years' War, the Prince-Bishopric of Warmia sided with Poland and officially recognized the overlordship of the Polish King. By the Second Peace of Thorn (1466) the Teutonic Knights renounced any claims to the prince-bishopric and recognized it as part of the Kingdom of Poland. It since formed part of the newly constituted Polish province of Royal Prussia, and after 1569 along with the province joined the Polish–Lithuanian Commonwealth, within which it was part of the larger Greater Poland Province of the Polish Crown, and Warmia's autonomy gradually faded, however, it flourished as an important religious, scientific and cultural center in Poland, thanks to such figures as Nicolaus Copernicus, Stanislaus Hosius, Marcin Kromer and Ignacy Krasicki.