Thirteen Years' War: Delegates of the Prussian Confederation pledge allegiance to King Casimir IV of Poland who agrees to commit his forces in aiding the Confederation's struggle for independence from the Teutonic Knights.

Casimir IV (in full Casimir IV Andrew Jagiellon; Polish: Kazimierz IV Andrzej Jagielloczyk [kaimj jal(l)jntk] (listen); Lithuanian: Kazimieras Jogailaitis; 30 November 1427 7 June 1492) was Grand Duke of Lithuania from 1440 and King of Poland from 1447, until his death. He was one of the most active Polish-Lithuanian rulers, under whom Poland, by defeating the Teutonic Knights in the Thirteen Years' War recovered Pomerania, and the Jagiellonian dynasty became one of the leading royal houses in Europe.

The great triumph of his reign was bringing Prussia under Polish rule. The rule of Casimir corresponded to the age of "new monarchies" in western Europe. By the 15th century Poland had narrowed the distance separating it from western Europe and become a significant factor in international relations. The demand for raw materials and semi-finished goods stimulated trade, producing a positive balance, and contributed to the growth of crafts and mining in the entire country. He was a recipient of the English Order of the Garter (KG), the highest order of chivalry and the most prestigious honour in England.

Following Casimir's death in 1492, John I Albert succeeded him as King of Poland, and Alexander Jagiellon was proclaimed Grand Duke of Lithuania.

The Thirteen Years' War (German: Dreizehnjähriger Krieg; Polish: wojna trzynastoletnia), also called the War of the Cities, was a conflict fought in 1454–1466 between the Prussian Confederation, allied with the Crown of the Kingdom of Poland, and the State of the Teutonic Order.

The war began as an uprising by Prussian cities and local nobility to win independence from the Teutonic Knights. In 1454 Casimir IV married Elisabeth of Habsburg and the Prussian Confederation asked Poland's King Casimir IV Jagiellon for help and offered to accept the king as protector instead of the Teutonic Order. When the King assented, war broke out between supporters of the Prussian Confederation, backed by Poland, and backers of government by the Teutonic Knights.

The Thirteen Years' War ended in the victory of the Prussian Confederation and Poland and in the Second Peace of Thorn (1466). This was soon followed by the War of the Priests (1467–1479), a drawn-out dispute over the independence of the Prussian Prince-Bishopric of Warmia (Ermland), in which the Knights also sought revision of the Peace of Thorn.