The War of the Priests (1467–1479, , ) was a conflict in the Polish province of Warmia between the King of Poland Casimir IV and Nicolaus von Tüngen, the new bishop of Warmia chosen – without the king's approval – by the Warmian chapter. The latter was supported by the Teutonic Knights, by this point vassals of Poland, who were seeking a revision of the recently signed Second Peace of Toruń. Political background The Bishopric of Warmia was, in the 14th century, part of the Monastic State of the Teutonic Knights, but enjoyed autonomy and was administrated as a prince-bishopric. The bishops, often members of the Teutonic Order, were loyal to the order even in early 15th century, when the Teutonic Knights raised the taxes to pay for the resulting costs of Polish–Lithuanian–Teutonic War. Eventually, the order's policies and tax increases led to opposition within Prussia and to the foundation of the Prussian Confederation in 1440 by Prussian cities who wanted to defend their rights against the order. The Prussian Confederation eventually asked for external aid and allied with the Polish king Casimir IV, asking to be incorporated into the Kingdom of Poland. This led to the Thirteen Years' War (1454–1466). The bishop of Warmia, Paul von Legendorf (1458–1467), joined the Prussian Confederation in the last year of the conflict (1466). The Second Peace of Thorn (1466) put Royal Prussia under the suzerainty of the Polish king. As part of the treaty, the king of Poland had the right to approve the bishop of Warmia, as chosen by the Warmian chapter. Election dispute In 1467, the chapter chose as bishop Nicolaus von Tüngen, while the Polish king promoted Wincenty Kiełbasa (at the time Bishop of Chełm) for the position. It was Tüngen who was approved by the pope, but he was unable to take the seat de facto and instead resided in Riga. Unable to get the pope's approval for Kiełbasa, Casimir changed tack and nominated Andrzej Oporowski, his chancellor, as bishop (Tüngen was to receive the Bishopric of Kamień). Oporowski however, unlike Kiełbasa, did not have the support of the Prussian estates as he was not from the region. This resulted in a dispute in which Tüngen was supported by the Teutonic Order and Matthias Corvinus, the king of Hungary. With help from the Order Tüngen was able to come to Warmia in 1472. In 1476 Corvinus invaded southern