the city was authorized by King Casimir IV to mint Polish coins. During the war, Casimir IV often stayed at the Dybów Castle and Toruń financially supported the Polish Army. The New and Old Towns amalgamated in 1454. The Thirteen Years' War ended in 1466, with the Second Peace of Thorn, in which the Teutonic Order renounced any claims to the city and recognised it as part of Poland. The Polish King granted the town great privileges, similar to those of Gdańsk. Also in 1454, in the Dybów Castle, the King issued the famous Statutes of Nieszawa, covering a set of privileges for the Polish nobility; an event that is regarded as the birth of the noble democracy in Poland, which lasted until the country's demise in 1795. Early modern period Throughout history, the city was home to notable personas, scholars and statesmen. In 1473, Nicolaus Copernicus was born, and, in 1501, Polish King John I Albert died in Toruń; his heart was buried inside St. John's Cathedral. In 1500, the Tuba Dei, which was the largest church bell in Poland at that time, was placed in the church of St. John the Baptist, and a bridge across the Vistula was built, which was the country's longest wooden bridge at that time. In 1506, Toruń became a royal city of Poland. In 1528, the royal mint started operating in Toruń. In 1568, a gymnasium was founded, which after 1594 became one of the leading schools of northern Poland for the centuries to come. Also in 1594, the Toruń's first museum (Musaeum) was established at the school, beginning the city's museal traditions. A city of great wealth and influence, it enjoyed voting rights during the royal election period. Sejms of the Polish–Lithuanian Commonwealth were held in Toruń in 1576 and 1626. In 1557, during the Protestant Reformation, the city adopted Protestantism. Under Mayor Henryk Stroband (1586–1609), the city became centralized. Administrative power passed into the hands of the city council. In 1595, Jesuits arrived to promote the Counter-Reformation, taking control of St John's Church. The Protestant city officials tried to limit the influx of Catholics into the city, as Catholics (Jesuits and Dominican friars) already controlled most of the churches, leaving only St Mary's to Protestant citizens. In 1645, at a time when religious conflicts occurred in many other European countries and the disastrous Thirty Years' War was fought west of