Polish–Teutonic Wars

Polish–Teutonic Wars refer to a series of conflicts that took place between the Kingdom of Poland and the Teutonic Order, a medieval German military order with roots in the Baltic region. These wars occurred primarily during the 14th and 15th centuries and were characterized by territorial disputes, political maneuvering, and religious differences.

The origins of the conflict can be traced back to the Teutonic Order's presence in the Baltic region, where they had established a state known as the Monastic State of the Teutonic Knights. This state included territories in what is now modern-day Poland, Lithuania, and Latvia. Tensions arose as the Teutonic Order sought to expand its influence and control over these territories, often bringing them into conflict with the Kingdom of Poland and the Grand Duchy of Lithuania.

The conflicts were influenced by a combination of political, economic, and religious factors. The Teutonic Order was a powerful military force, and their expansionist policies often clashed with the interests of Poland and Lithuania.

The most notable conflict within this series of wars is the Battle of Grunwald (1410), where a coalition of Polish and Lithuanian forces decisively defeated the Teutonic Knights. This victory had significant implications for the balance of power in the region and marked the decline of the Teutonic Order's influence.

Subsequent treaties, such as the Peace of Thorn (1411), resulted in territorial adjustments and established a more stable relationship between the parties involved. Over time, the Teutonic Order's influence waned, and the territories it once controlled in the Baltic region gradually came under the sway of Poland and Lithuania. The Polish–Teutonic Wars played a crucial role in shaping the geopolitical landscape of East-Central Europe during the late medieval period.

Teutonic takeover of Danzig (Gdańsk) (1308)
The city of Danzig (Gdańsk) was captured by the State of the Teutonic Order on 13 November 1308, resulting in a massacre of its inhabitants and marking the beginning of tensions between Poland and the Teutonic Order. Originally the knights moved into the fortress as an ally of Poland against the Margraviate of Brandenburg. However, after disputes over the control of the city between the Order and the King of Poland arose, the knights murdered a number of citizens within the city and took it as their own. Thus the event is also known as Gdańsk massacre or Gdańsk slaughter (rzeź Gdańska). Though in the past a matter of debate among historians, a consensus has been established that many people were murdered and a considerable part of the town was destroyed in the context of the takeover.

In the aftermath of the takeover, the order seized all of Pomerelia (Gdańsk Pomerania) and bought up the supposed Brandenburgian claims to the region in the Treaty of Soldin (1309). The conflict with Poland was temporarily settled in the Treaty of Kalisz (1343). The town was returned to Poland in the Second Peace of Thorn in 1466.

Background
In the 13th century, the Pomerelian duchy was ruled by members of the Samborides, originally stewards for the Polish Piast kings and dukes. The stewards asserted their power from fortified strongholds. The major stronghold of the area was at the location of present-day Gdańsk's Old Town. The adjacent town developed from a market place of tradesmen and was granted Lübeck city rights by Duke Swietopelk II in 1224.

Under Swietopelk II, Gdańsk became an important trading site on the lower Vistula.

The Margraviate of Brandenburg entered the scene after Mestwin II, son of Swietopelk, concluded the Treaty of Arnswalde with them, in order to receive aid against his brother, Wartislaw. The margraves took over the town in 1270/1 from Wartislaw, but did not hand it over to Mestwin until the latter was able to force them out by concluding an alliance with Bolesław the Pious, duke of Greater Poland. Under the rule of Brandenburg, conflicts erupted between the Slavic and German populations, which cost many lives. In the 1282 Treaty of Kępno Mestwin II promised his Pomerelian duchy to his ally Przemysł II, duke and later king of Poland, who succeeded to the duchy after Mestwin's death in 1294.

The Margraves of Brandenburg also claimed the region and had Przemysł assassinated in early 1296. Władysław I the Elbow-high (Łokietek), Przemysł's successor, was only in loose control of Pomerelia and Gdańsk with the actual control of the area being in the hands of the local Swienca family who had come into power already under Mestwin II. In 1301, one year after Wenceslaus II of Bohemia had been crowned king of Poland, the princes of Rügen, who also claimed to be the heirs of Pomerelia, mounted an expedition. Wenceslaus, who with the Polish crown had also acquired the claim to Pomerelia, called the Teutonic Order for help. The Teutonic knights occupied Gdańsk, repelled the princes of Rügen, and left the town in 1302. While the Norwegian king Haakon backed Rügen's claims, his 1302 call to the Hanseatic cities for aid remained without answer.

Wenceslaus II died in 1305 and was succeeded by Wenceslaus III, murdered in 1306. In a treaty of 8 August 1305, the margraves of Brandenburg promised to Wenceslaus III the Meissen (Miśnia) territory in exchange for Pomerelia, but that treaty was never finalized. The Teutonic Order had inherited Gniew (Mewe) from Sambor II, thus gaining a foothold on the left bank of the Vistula. Brandenburg occupied the west of the duchy after neutralizing another claimant to the area, the Cammin bishop, by burning down his see.

Rebellion of 1308 and Brandenburgian siege
Meanwhile, Władysław I the Elbow-high had reestablished his power in Poland, but was occupied in the south of his realm. He appointed Bogusza as his Pomerelian governor in Gdańsk. In the summer of 1308, a rebellion was incited by the local Swienca family allied with Waldemar of Brandenburg, resulting in a Brandenburgian intervention which unseated the forces loyal to Łokietek, who later would become King of Poland. Bogusza and his men had retreated to the castle next to the town, and were besieged by the margraves.

Bogusza, on the advice of the Dominican prior Wilhelm, appealed to the Teutonic Knights in Prussia for assistance.

Teutonic takeover
The Knights, under the leadership of Heinrich von Plotzke, agreed to aid Bogusza, and a force of 100 knights and 200 supporters, led by Günther von Schwarzburg, arrived at the castle around August.

While historians agree that the castle as well as the adjacent town were in the hands of the Teutonic Knights by late November 1308, the number of casualties and the extent of destruction is debated. Peter Oliver Loew writes that for a long time German historians accepted the version of events given by Teutonic Knights, and didn't accept a high number of people murdered, with the number given between 60 and 100 victims Błażej Śliwiński, based on several sources argues that the number of murdered was very high, even if not 10,000. According to Peter Oliver Loew the exact numbers can never be established, however he agrees that all available data confirms that the city was destroyed during the conquest.

Ethnicity of the town's inhabitants
According to Raphael Lemkin the population in the city at the time was Polish. According to Kazimierz Jaśinski, the Knights captured the town with the help from some of the German burghers, who constituted a very small minority within the town at the time. James Minahan wrote that the city inhabitants, for the most part, were Kashubians. According to Peter Oliver Loew, there were German as well as Slavic inhabitants of the town. According to Stefan Maria Kuczyński, the German population only achieved the majority after local Polish population was murdered and a new settlement was built by Teutonic Knights.

Teutonic Knights entering the town
According to Błażej Śliwiński at the time of events, Gdańsk with surrounding settlements had around 2000 to 3000 inhabitants The forces of the order had arrived in two columns: one re-inforced the Polish garrison in the castle, the other one marched against the town from the south and raised a siege. In the castle, conflict arose between the Teutonic and Polish knights, with the latter opposing a takeover by the former. After several encounters, the outnumbered Polish forces left the castle, with some of them defecting to the rebellious inhabitants of the town and the Brandenburgers. In the evening of 12 November 1308, the Teutonic Knights succeeded in forcing their way inside the town. During the ensuing close combat in the streets, the Teutonic Knights gained the upper hand over the defending Brandenburgian forces, burghers and Pomerelian knights. The victorious knights killed many citizens and opposing knights. By the morning of 13 November, the defendants were utterly defeated, bodies were lying in the streets and executions were going on. According to Halina Wątróbska, half of the town was promised to the Teutonic Order in return for aiding Bogusza's men. The Teutonic Knights then moved in, defeated the Brandenburgers and had the townspeople accept Łokietek as their suzerain. However, on 13 November they "took over the whole town, thereby killing everyone who defied their will."

Udo Arnold says that a dispute between the castle's garrison and the Teutonic knights arose when the Brandenburgers were about to leave. While the dispute was about the co-ordination of further action and unsettled payment, Arnold says that it was at the same time that "the order's policy changed from providing aid towards annexing Pomerelia and buying up existing legal claims," which was opposed by the population of Danzig. This was answered by the order on 13 November "by the uncompromising levelling of the greater part of the town."

Ulrich Nieß says that as a consequence of the appearance of Teutonic Order forces in the castle, the Brandenburgers left, and soon left also the initial Pomerelian and Kuyavian garrison of the castle after a dispute with the Teutonic Knights. The town, though still preferring Brandenburg rule, offered asylum to the garrison, and in relying on its Lübeck law charter refused to allow the Teutonic Knights to enter and to follow an order to lay down its fortifications. On 13 November, the order's forces with personal involvement of Plotzke forced their way into the town, though no larger battle took place. The order then held a tribunal in the town and ordered large-scale demolishments of its buildings. Quote: "Zwischen der pomeranisch-kujawischen Burgmannschaft und den einziehenden Ordensverbänden traten schon sehr bald Spannungen auf, die zum Abzug der ersteren aus der Burg führten. Zurück zogen sich auch die Truppen der Brandenburger, die das Eingreifen des Ordens, wie erwähnt, völlig unerwartet traf. Die Stadt Danzig selbst öffnete hingegen den aus der Burg abziehenden Verbänden aus Pomeranen und Kujawiern die Tore. Die Führer der deutschrechtlichen civitas wollten offenbar auch jetzt noch den Anschluß an die Markgrafschaft, mindestens aber verweigerten sie dem Ordensheer den Einzug. Es kam zu Kampfhandlungen, in deren Gefolge die Stadt am 13. November 1308 zur Übergabe gezwungen wurde. Heinrich von Plötzke hatte die Operation persönlich geleitet. Langwierige oder verlustreiche Kämpfe haben allerdings nicht stattgefunden und können daher auch nicht für das schwere Ausmaß an Zerstörungen, denen insbesondere die Rechtstadt, die civitas, zum Opfer fiel, verantwortlich sein. ... Die Ordensleitung verlangte offenbar von der Stadtgemeinde die Niederlegung ihrer Befestigungsanlagen - eine Maßnahme, die Mestwin II. 1272 ebenfalls angeordnet hatte. Die Stadt fügte sich aber 1308 nicht dem Befehl des Ordens, verwies auf ihre Privilegien und wohl auch darauf, daß der Orden nicht der Landesherr war. Auf Ordensseite wiederum gehörte es zur selbstverständlichen Gepflogenheit, keine umfangreichen städtischen Befestigungsanlagen zu dulden; er verbot derartiges auch bei seinen eigenen Stadtgründungen. Militärisches Sicherheitsdenken traf hier auf städtisches Selbstbewußtsein, in den Augen der Ordensleitung war die Stadtgemeinde „hochmütig", während die Danziger meinten, der Orden habe keine Rechtsgrundlage für sein Ansinnen. Infolge dieser spezifischen Konstellation eskalierte der Konflikt, kam es zu einer Politik der Härte. Die Bürger mußten - sicherlich alles andere als freiwillig - ihre Häuser räumen, die verbrannt wurden."

Massacre records
Soon after the takeover, on 19 June 1310, the Teutonic Knights faced charges that they had committed a massacre in a bull issued by pope Clement V: "Latest news were brought to my attention, that officials and brethren of the aforementioned Teutonic order have hostilely intruded the lands of Our beloved son Wladislaw, duke of Cracow and Sandomierz, and in the town of Gdańsk killed more than ten thousand people with the sword, inflicting death on whining infants in cradles whom even the enemy of faith would have spared." The source of the allegation is unknown. The respective bull contained other charges against the Teutonic Order, resulting from a dispute between its Livonian branch and the citizens as well as the archbishop of Riga, Friedrich von Pernstein. According to Ulrich Nieß, von Pernstein was the likely the source of the allegation of the ten thousand massacred. The bull called for an investigation of the charges which was started by Francis of Moliano in 1312. During the inquisition, Moliano excommunicated the Teutonic Knights, but this was reversed in 1313. The Riga lawsuit was finally decided in the Teutonic Order's favor by Clement's successor John XXII after a hearing in Avignon in 1319.

Under Władysław Łokietek and his successor Casimir III the Great an additional two lawsuits were filed against the order at the curia, both aiming at the return of Pomerelia. The sites of investigation were Inowrocław and Brześć Kujawski in 1320/21 and Warsaw in 1339. The judges were Domarat, bishop of Poznań, Janisław, archbishop of Gniezno and, Nikolaus (Mikolaj), abbot of Mogilno in the first case and Galhard of Chartres and Peter (Pierre) of Gervais in the second case. Witness and eyewitness reports collected during these cases include mentions of killings during the takeover of Danzig, referred to e.g. as strage magna or maxima (great (est) murder/bloodbath), while the Teutonic Order admitted the killing of 15 to 16 Pomerelian knights. The testimonies from the lawsuits and the order's responses are the primary sources used by historians to reconstruct the events.

The lawsuits did not have any practical effect on the order, who won both cases by appeal. In the 15th century, era of the Polish-Teutonic Wars, medieval Polish chronicler Jan Długosz in epic prose described the event as a slaughter of Polish nationals, regardless of condition, age or sex.

Modern sources are divided as to the actual extent of the massacre though they all agree that mass killings did take place. Historian Matthew Kuefler states: "German and Polish historians in the twentieth century tended to have diverging [views] both on the question of whether Pomerelia really "belonged" to Poland and also on the degree of ferocity of the order's conquest". The city of Gdańsk states that "The Teutonic Knights, having captured the castle in 1308 butchered the population. Since then the event is known as the Gdańsk slaughter". In many Polish works, the takeover is referred to as "Gdańsk slaughter" (rzeź Gdańska). Norman Davies in his extensive history of Poland, while not insisting on the number of 10,000 dead, says that the knights "drove Waldemar from the city, and calmly slaughtered its inhabitants", similar descriptions are presented also in some other English books with sections on Polish history. Jerzy Lukowski in "A concise history of Poland" says that the knights massacred "Lokietek's men". Błażej Śliwiński says that there was a bloodbath which cost an abundance of lives, though not 10,000, and that such massacres were common in medieval Europe., and that the term "slaughter" in Medieval Ages usually meant murder of around 1000 people.

According to Peter Oliver Loew, older German historiography was more inclined to trust the Knights' claims and argued that a number of 10,000 is virtually impossible for a medieval town. A number of 60 to 100 was regarded as reasonable. This view was shared by many Polish historians after World War II, however, Błażej Śliwiński's presented numerous pieces of evidence that what occurred was indeed a "bloodbath" with a very high number of victims, although not as high as 10,000, and more likely around 1000. Loew adds that from the source material available to historians, the definite number of casualties is impossible to establish. William Urban says that the number of 10,000 dead has been considered greater than the city's population at the time.

Kazimierz Jasiński states that the number of those killed was "not less than sixty, and not more than several hundred", that the victims were killed after the takeover rather than during it, and hence the massacre was carried out on defenseless individuals, both knights and burghers, who had laid down their arms. According to Jasiński says the 16 deaths admitted by the order were actually only the most famous Polish knights among those killed. Błażej Śliwiński (2008) estimates the number of dead between 50 and 60 knights, including 16 from notable houses, and over 1000 commoners among the city's population, which he gives as between 2,000 and 3,000 people (including surrounding settlements).

Gerard Labuda and Marian Biskup (1993) write that the number of murdered inhabitants is not established, but that the victims of the massacre include at least several dozen notable knights and members of nobility as well as significant number of commoners and simple soldiers. Biskup in a later publication from 1993 writes that victims included defenders of the castle and burghers along with members of their families in addition to 100 murdered knights. According to Maksymilian Grzegorz (1997), German historians tend to minimize the number of murdered victims of the Teutonic Knights, while Polish historians estimate the number at between at minimum 60 to several hundred.

Destruction of the town
Historians are divided on whether the townspeople after the takeover had to demolish only the city walls or, in addition, at least part of the town's buildings. Based on recent archaeological findings, Loew says that this conflict is about to be decided in favor of the destruction thesis: "burn marks and clear evidence for planation of the terrain in the early 14th century prove its [the town's] destruction in the years of 1308/09 by the Teutonic Order."

According to Ulrich Nieß, the destruction of the town was part of the order's policy of securing its lands from potential inner rivals. Nieß says that the destruction of the city walls was in line with the order's contemporary policy of not allowing their own foundations to be substantially fortified either, and that the refusal of the town to obey to the order's demand to level their walls led to a "policy of hardness" being implemented on the townspeople, who had to evacuate their houses which afterward were burned down. Nieß says that the procurator of the order had himself reported these proceedings to the pope, claiming the burghers evacuated and burned their houses voluntarily (which Nieß strongly denies). Nieß is also pointing out that in the subsequent capture of Tczew (Dirschau) by the order, the townspeople similarly had to sign an agreement to evacuate their homes, though this was not put into effect.

According to Loew, the archaeological evidence suggests that it took a couple of years before new streets and buildings were built on top of the flattened debris of the former buildings, though there probably were areas of the town which had remained unharmed. Referring to records of Danzig burghers taking residence in Lübeck, Loew says it is likely that most of the former inhabitants left Danzig in 1308.

Aftermath
When the Poles refused to accept monetary compensation for the Knights' takeover of the city, the Order resorted to conquering further towns like Świecie. The local colony of merchants and artisans was specifically attacked because they competed with the Knights' town of Elbing (Elbląg), a nearby city. The Knights also attacked Tczew (Dirschau).

The Knights then captured the rest of Pomerelia from Brandenburg's troops. In September 1309, Margrave Waldemar of Brandenburg-Stendal sold his claim to the territory to the Teutonic Order for 10,000 marks in the Treaty of Soldin (now Myślibórz), thereby connecting the State of the Teutonic Order with that of the Holy Roman Empire. While for the order, this landbridge with the empire was a major strategic improvement by connecting its Baltic territories to its German bailiwicks (ballei), it was at the same time a major loss for Poland which had become a landlocked country.

Thus, the takeover triggered a series of conflicts between Poland and the Teutonic Order, and these conflicts in turn triggered a conflict within the order itself. Some prominent brethren favoured a concession of Pomerelia in exchange for good relations with Poland, but were opposed by a majority of the knights who thought that such a concession would eventually lead to the total expulsion of the knights from their state. These disagreements caused the abdication of Grand Master Charles of Trier in 1318 and the murder of the succeeding Grand Master Werner of Orseln in 1330. The possession of Danzig and Pomerelia by the Teutonic Order was questioned consistently by the Polish kings Władysław I and Casimir the Great in legal suits in the papal court in 1320 and 1333. Both times, as well as in 1339, the Teutonic Knights were ordered by the Pope to return Pomerelia and other lands back to Poland, but did not comply. As a result, in the late 1330s, a war ensued.

Peace was established in the Treaty of Kalisz in 1343; although the Polish kings were able to retain the title "Duke of Pomerania" and were recognized as titular overlords of the crusaders, the Knights retained control of Danzig. - this time, with the permission of the papal court.

Development of the city stagnated after its capture by the Teutonic Knights. Initially the new rulers tried to reduce the economic significance of Danzig by abolishing the local government and the privileges of the merchants. This was exemplified by the fact that the city council, including Arnold Hecht and Conrad Letzkau, was removed and beheaded in 1411. Later the Knights were forced to accept the fact that city defended its independence and was the largest and most important seaport of the region after overtaking Elbing. Subsequently, it flourished, benefiting from major investment and economic prosperity in the Monastic state and Poland, which stimulated trade along the Vistula. The city had become a full member of the merchant association, the Hanseatic League by 1361, but its merchants remained resentful at the barriers to trade up the Vistula river with Poland, along with the lack of political rights in a state ruled in the interest of the Order's religiously motivated knight-monks. As a result, the city became a co-founder of the Prussian Confederation which formally petitioned Casimir IV Jagiellon, to incorporate Prussia, including Danzig, into the Kingdom of Poland in 1454.

Polish–Teutonic War (1326–1332)
The Polish–Teutonic War (1326–1332) was the war between the Kingdom of Poland and the State of the Teutonic Order over Pomerelia, fought from 1326 to 1332.

Background
Until the death of Duke Mestwin II in 1294, the Duchy of Pomerelia on the Baltic coast, stretching from the border with the Imperial Duchy of Pomerania in the west to the Prussian territory of the Order state at the Vistula river in the east, had been held by the Samborides dynasty, liensmen of the Polish Piast rulers. Przemysł II, King of Poland since 1295, incorporated Pomerelia (Pomorze Gdańskie) into the Lands of the Polish Crown, against the protest of the Imperial Margraviate of Brandenburg referring to the Treaty of Arnswalde signed with Duke Mestwin in 1269. The next year, the Ascanian margraves instigated the kidnapping and killing of King Przemysł, probably backed by King Wenceslaus II of Bohemia, who aimed for the Polish crown.

King Wenceslaus II prevailed against his Piast rival Władysław I the Elbow-high and was crowned King of Poland in 1300. He ruled in Pomerelia with the assistance of the local Swenzones noble family. Upon the assassination of his son Wenceslaus III in 1306, the Přemyslid dynasty became extinct and Duke Władysław was able to occupy the Pomerelian lands. The Swenzones, fearing for their assets and sinecures, called for Margrave Waldemar of Brandenburg, whose troops occupied the territory up to the city of Gdańsk. Władysław reacted by calling the forces of the Teutonic Order, who under the command of Heinrich von Plötzke in 1308 re-conquered Gdańsk and most of Pomerelia.

However, after the Teutonic takeover they denied the handover to Władysław, as the duke refused to pay the requested expense allowance. Instead they concluded the 1309 Treaty of Soldin with Margrave Waldemar, whose resistance from the beginning had been relatively weak and who now was willing to sell off his claims to Pomerelia.

The battles
Władysław, chafing under his defeat, unsuccessfully sued the Teutonic Order at the Roman Curia. However, he was crowned Polish king in 1320 and forged new alliances with the Kingdom of Hungary and the Grand Duchy of Lithuania, when he married his daughter Elisabeth to King Charles I in 1320 and his son Casimir to Aldona of Lithuania, daughter of Grand Duke Gediminas. On the other hand, the Kingdom of Bohemia, since 1310 under the rule of the mighty House of Luxembourg, rose again and King John the Blind himself claimed the Polish crown as a heritage from the Přemyslids. The Teutonic Knights supported King John, who joined them in crusades against the pagan Lithuanians, and furthermore were allied with Władysław's enemy in Masovia, Duke Wenceslaus of Płock. In 1326 the forces of King Władysław with Lithuanian support devastated the Neumark region and the next year turned against the Teutonic Order, while in the south King John the Blind marched against Kraków. Though he was urged by King Charles I of Hungary to retreat, he vassalized many of the Duchies of Silesia. Taking advantage of the weakness of Poland due to the internal fragmentation, the Teutonic knights pillaged and conquered the Polish Kuyavian region and the Dobrzyń Land. King Władysław received help from Lithuania and Hungary – commanded by William Drugeth – and in turn pillaged the Kulmerland of Teutonic Prussia up to the Osa River near Grudziądz.

The Teutonic Knights counterattacked, taking many towns in Kuyavia and Dobrzyń. A Polish and Lithuanian counterattack in 1330 resulted in a temporary peace, with the Order returning part of its military gains to Poland, but over the next year, the fighting continued. After the indecisive Battle of Płowce in 1331, the Order gained the upper hand and retook Kuyavia and Dobrzyń Land. Both sides agreed on an armistice, while King Władysław died in 1333.

Aftermath
In 1343, the territorial claims of the parties were settled in the Peace of Kalisz signed by Władysław's son King Casimir III, formally ending the war. He thereby regained Kuyavia and Dobrzyń, but finally lost Pomerelia. Nevertheless, he retained the title of a Pomeraniæ dominus et heres ("Lord and Heir of Pomerania").

The Pomerelian lands and the Polish access to the Baltic Sea remained a matter of conflict: regained as the Polish fief of Royal Prussia after the Second Peace of Thorn (1466), annexed by the Kingdom of Prussia in the course of the First Partition of Poland in 1772, and part of the "Polish Corridor" created by the 1919 Treaty of Versailles, the ongoing dispute over the region for centuries put a strain on German–Polish relations.

Polish–Lithuanian–Teutonic War (1409-1411)
The Polish–Lithuanian–Teutonic War, also known as the Great War, occurred between 1409 and 1411 between the Teutonic Knights and the allied Kingdom of Poland and Grand Duchy of Lithuania. Inspired by the local Samogitian uprising, the war began with a Teutonic invasion of Poland in August 1409. As neither side was ready for a full-scale war, Wenceslaus IV of Bohemia brokered a nine-month truce.

After the truce expired in June 1410, the military-religious monks were decisively defeated in the Battle of Grunwald, one of the largest battles in medieval Europe. Most of the Teutonic leadership was killed or taken prisoner. Although they were defeated, the Teutonic Knights withstood the siege on their capital in Marienburg (Malbork) and suffered only minimal territorial losses in the Peace of Thorn (1411). Territorial disputes lasted until the Peace of Melno of 1422.

However, the Knights never recovered their former power, and the financial burden of war reparations caused internal conflicts and economic decline in their lands. The war shifted the balance of power in Central Europe and marked the rise of the Polish–Lithuanian union as the dominant power in the region.

Uprising, war and truce
In May 1409, an uprising in Teutonic-held Samogitia started. Lithuania supported the uprising and the Knights threatened to invade. Poland announced its support for the Lithuanian cause and threatened to invade Prussia in return. As Prussian troops evacuated Samogitia, the Teutonic Grand Master Ulrich von Jungingen declared war on the Kingdom of Poland and Grand Duchy of Lithuania on 6 August 1409. The Knights hoped to defeat Poland and Lithuania separately and began by invading Greater Poland and Kuyavia, catching the Poles by surprise. The Knights burned the castle at Dobrin (Dobrzyń nad Wisłą), captured Bobrowniki after a fourteen-day siege, conquered Bydgoszcz (Bromberg), and sacked several towns. The Poles organized counterattacks and recaptured Bydgoszcz. The Samogitians attacked Memel (Klaipėda). However, neither side was ready for a full-scale war. Wenceslaus, King of the Romans, agreed to mediate the dispute. A truce was signed on 8 October 1409; it was set to expire on 24 June 1410. Both sides used this time for preparations for the battle, gathering the troops and engaging in diplomatic maneuvers. Both sides sent letters and envoys accusing each other of various wrongdoings and threats to Christendom. Wenceslaus, who received a gift of 60,000 florins from the Knights, declared that Samogitia rightfully belonged to the Knights and only Dobrzyń Land should be returned to Poland. The Knights also paid 300,000 ducats to Sigismund of Hungary, who had ambitions for the principality of Moldova, for his military assistance. Sigismund attempted to break the Polish–Lithuanian alliance by offering Vytautas a king's crown; Vytautas's acceptance of such a crown would violate the terms of the Ostrów Agreement and create Polish-Lithuanian discord. At the same time Vytautas managed to obtain a truce from the Livonian Order.

Strategy and march in Prussia
By December 1409, Jogaila and Vytautas had agreed on a common strategy: their armies would unite into a single massive force and march together towards Marienburg (Malbork), capital of the Teutonic Knights. The Knights, who took a defensive position, did not expect a joint attack and were preparing for a dual invasion – by the Poles along the Vistula River towards Danzig (Gdańsk) and by the Lithuanians along the Neman River towards Ragnit (Neman). To counter this perceived threat, Ulrich von Jungingen concentrated his forces in Schwetz (Świecie), a central location from where troops could respond to an invasion from any direction rather quickly. To keep the plans secret and misguide the Knights, Jogaila and Vytautas organised several raids into border territories, thus forcing the Knights to keep their troops in place.

The first stage of the Grunwald campaign was gathering all Polish–Lithuanian troops at Czerwinsk, a designated meeting point about 80 km (50 mi) from the Prussian border, where the joint army crossed the Vistula over a pontoon bridge. This maneuver, which required precision and intense coordination among multi-ethnic forces, was accomplished in about a week from 24 to 30 June 1410. After the crossing, Masovian troops under Siemowit IV and Janusz I joined the Polish–Lithuanian army. The massive force began its march north towards Marienburg (Malbork), capital of Prussia, on 3 July. The Prussian border was crossed on 9 July. As soon as Ulrich von Jungingen grasped Polish–Lithuanian intentions, he left 3,000 men at Schwetz (Świecie) under Heinrich von Plauen and marched the main forces to organise a line of defence on the Drewenz River (Drwęca) near Kauernik (Kurzętnik). On 11 July, Jogaila decided against crossing the river at such a strong defensible position. The army would instead bypass the river crossing by turning east, towards its sources, where no other major rivers separated his army from Marienburg. The Teutonic army followed the Drewenz River north, crossed it near Löbau (Lubawa), and then moved east in parallel with the Polish–Lithuanian army. The latter ravaged the village of Gilgenburg (Dąbrówno). Von Jungingen was so enraged by the atrocities that he swore to defeat the invaders in battle.

Battle of Grunwald
The Battle of Grunwald took place on 15 July 1410 between the villages of Grunwald, Tannenberg (Stębark) and Ludwigsdorf (Łodwigowo). Modern estimates of number of troops involved range from 16,500 to 39,000 Polish–Lithuanian and 11,000 to 27,000 Teutonic men. The Polish–Lithuanian army was an amalgam of nationalities and religions: the Roman Catholic Polish–Lithuanian troops fought side by side with pagan Samogitians, Eastern Orthodox Ruthenians, and Muslim Tatars. Twenty-two different peoples, mostly Germanic, joined the Teutonic side.

The Knights hoped to provoke Poles or Lithuanians to attack first and sent two swords, known as Grunwald Swords, to "assist Jogaila and Vytautas in battle". Lithuanians attacked first, but after more than an hour of heavy fighting, the Lithuanian light cavalry started a full retreat. The reason for the retreat – whether it was a retreat of the defeated force or a preconceived maneuver – remains a topic of academic debate. Heavy fighting began between Polish and Teutonic forces and even reached the royal camp of Jogaila. One Knight charged directly against King Jogaila, who was saved by royal secretary Zbigniew Oleśnicki. The Lithuanians returned to the battle. As Grand Master von Jungingen attempted to break through the Lithuanian lines, he was killed. Surrounded and leaderless, the Teutonic Knights began to retreat towards their camp in hopes to organize a defensive wagon fort. However, the defense was soon broken and the camp was ravaged and according to an eyewitness account, more Knights died there than in the battlefield.

The defeat of the Teutonic Knights was resounding. About 8,000 Teuton soldiers were killed and an additional 14,000 were taken captive. Most of the brothers of the Order were killed, including most of the Teutonic leadership. The highest-ranking Teutonic official to escape the battle was Werner von Tettinger, Komtur of Elbing (Elbląg). Most of the captive commoners and mercenaries were released shortly after the battle on condition that they report to Kraków on 11 November 1410. The nobles were kept in captivity and high ransoms were demanded for each.

Siege of Marienburg
After the battle, the Polish and Lithuanian forces delayed their attack on the Teutonic capital in Marienburg (Malbork) by staying on the battlefield for three days and then marching an average of only about 15 km (9.3 mi) per day. The main forces did not reach heavily fortified Marienburg until 26 July. This delay gave Heinrich von Plauen enough time to organize a defense. Polish historian Paweł Jasienica speculated that this was likely an intentional move by Jagiełło, who together with Vytautas preferred to keep the humbled but not decimated Order in play as to not upset the balance of power between Poland (which would most likely acquire most of the Order possessions if it was totally defeated) and Lithuania; but a lack of primary sources precludes a definitive explanation. Jogaila, meanwhile, also sent his troops to other Teutonic fortresses, which often surrendered without resistance, including the major cities of Danzig (Gdańsk), Thorn (Toruń), and Elbing (Elbląg). Only eight castles remained in Teutonic hands. The Polish and Lithuanian besiegers of Marienburg were not prepared for a long-term engagement, suffering from lack of ammunition, low morale, and an epidemic of dysentery. The Knights appealed to their allies for help and Sigismund of Hungary, Wenceslaus, King of the Romans, and the Livonian Order promised financial aid and reinforcements. The siege of Marienburg was lifted on 19 September. The Polish–Lithuanian forces left garrisons in fortresses that were captured or surrendered and returned home. However, the Knights quickly recaptured most of the castles. By the end of October, only four Teutonic castles along the border remained in Polish hands. Jogaila raised a fresh army and dealt another defeat to the Knights in the Battle of Koronowo on 10 October 1410. Following other brief engagements, both sides agreed to negotiate.

Aftermath
The Peace of Thorn was signed on 1 February 1411. Under its terms, the Knights ceded the Dobrin Land (Dobrzyń Land) to Poland and agreed to resign their claims to Samogitia during the lifetimes of Jogaila and Vytautas, although another two wars (the Hunger War of 1414 and the Gollub War of 1422) would be waged before the Treaty of Melno permanently resolved the territorial disputes. The Poles and Lithuanians were unable to translate the military victory into territorial or diplomatic gains. However, the Peace of Thorn imposed a heavy financial burden on the Knights from which they never recovered. They had to pay an indemnity in silver, estimated at ten times the annual income of the King of England, in four annual installments. To meet the payments, the Knights borrowed heavily, confiscated gold and silver from churches, and increased taxes. Two major Prussian cities, Danzig (Gdańsk) and Thorn (Toruń), revolted against the tax increases. The defeat at Grunwald left the Teutonic Knights with few forces to defend their remaining territories. Since both Poland and Lithuania were now Christian countries, the Knights had difficulties recruiting new volunteer crusaders. The Grand Masters then needed to rely on mercenary troops, which proved an expensive drain on their already depleted budget. The internal conflicts, economic decline and tax increases led to unrest and the foundation of the Prussian Confederation, or Alliance against Lordship, in 1441. That, in turn, led to a series of conflicts that culminated in the Thirteen Years' War (1454).

Hunger War (1414)
The Hunger War (German: Hungerkrieg, Polish: Wojna głodowa) or Famine War was a brief conflict between the allied Kingdom of Poland, and Grand Duchy of Lithuania, against the Teutonic Knights in summer 1414 in an attempt to resolve territorial disputes. The war earned its name from destructive scorched earth tactics followed by both sides. While the conflict ended without any major political results, famine and plague swept through Prussia. According to Johann von Posilge, 86 friars of the Teutonic Order died from plague following the war. In comparison, approximately 200 friars perished in the Battle of Grunwald of 1410, one of the biggest battles in medieval Europe.

Background
After the Polish–Lithuanian–Teutonic War of 1410–1411 not all issues between the Grand Duchy of Lithuania and Teutonic Knights were settled. The most contentious matter was the border between Samogitia and Prussia. Grand Duke of Lithuania Vytautas the Great demanded the entire right bank of the Neman River including the town of Memel (Klaipėda). The Knights demanded that after deaths of Vytautas and Jogaila, King of Poland, Samogitia would pass to them. Sigismund, Holy Roman Emperor, agreed to mediate the dispute and appointed Benedict Makrai to hear the arguments. On 3 May 1413, Benedict made the decision and recognized the right bank of the Neman River, including Klaipėda, to Lithuania. The Knights refused to accept this decision and Teutonic Grand Master Heinrich von Plauen ordered Teutonic armies into northern Poland. The army, commanded by Michael Küchmeister von Sternberg, returned into Prussia after just 16 days of campaign. The knights did not believe that the Order, still recovering from the defeat in the Battle of Grunwald in 1410, was ready for another war with Poland. Küchmeister deposed von Plauen and became the Grand Master. He attempted to reopen the negotiations with Poland in May 1414. As King Jogaila demanded to reinstate von Plauen and refused any attempts at a compromise, the talks broke down.

The war
In the summer of 1414, armies of King Jogaila and Grand Duke Vytautas invaded Prussia, ruled by the monastic state. They advanced through Osterode (Ostróda) into Warmia, plundering villages and burning crops. The Teutonic Knights chose to concentrate their defensive efforts in Culmerland (Chełmno Land). The Knights remained in their castles and refused an open battle after realizing the superiority of Polish and Lithuanian forces in a potential pitched battle. Küchmeister deployed scorched earth tactics hoping to deprive invading armies of food and supplies. This tactic later resulted in a famine and plague in the region. The invaders themselves were not able or willing to seek a decisive military victory via lengthy sieges of Teutonic castles. Papal legate William of Lausanne proposed resolving the conflict through diplomacy and a two-year truce was signed in Strasburg (now Brodnica) in October. Jogaila and Vytautas agreed to present their case to the Council of Constance. However, the territorial disputes were not resolved until the Treaty of Melno in 1422.

Golub War (1422)
The Golub War was a two-month war of the Teutonic Knights against the Kingdom of Poland and the Grand Duchy of Lithuania in 1422. It ended with the signing the Treaty of Melno, which resolved territorial disputes between the Knights and Lithuania over Samogitia that had dragged on since 1398.

Background
The First Peace of Thorn of 1411 had ostensibly ended conflicts between the warring powers of the Polish-Lithuanian–Teutonic War, although the border between Samogita and Prussia was not determined. Poland also contested Pomerania, Pomerelia, and Culmerland (Chełmno Land). When numerous attempts at negotiations failed, a brief Hunger War broke out in summer 1414. Since Poles and Lithuanians were unable to capture strongly fortified Ordensburgen of the Knights, parties agreed to mediate their dispute in the Council of Constance. The council established the Samogitian Diocese in Varniai and appointed Matthias of Trakai as its first bishop. However, it did not solve the underlying territorial disputes by the time it ended in 1418. A new, but futile, round of negotiations started in May 1419 in Gniewków with papal legate Bartholomew Capri, archbishop of Milan, as mediator. The dispute was then passed to Sigismund, Holy Roman Emperor, for further mediation. On January 6, 1420 in Wrocław the emperor delivered his decision that the Peace of Thorn was valid and fair. That meant that Samogitia belonged to Lithuania only for the lifetime of Vytautas the Great, Grand Duke of Lithuania, and Jogaila, King of Poland. After their deaths Samogitia was to return to the Teutonic Knights. Other territorial claims were also rejected. The emperor granted the Knights even more rights than they demanded in negotiations. This decision was probably influenced by the fact that Sigismund hoped to receive support from the Teutonic Knights in his war with the Hussites, who were supported by Vytautas. Vytautas and Jogaila categorically refused to accept this decision. Jogaila unsuccessfully appealed to Pope Martin V.

The war
In July 1422, the Emperor Sigismund and the Teutonic Knights devoted resources to a war against the Hussites, who attacked and devastated large parts of Germany. The pope called for strong measure to 'get rid of this plague'. Vytautas and Jogaila used the preoccupation with defense against the Hussite raids by attacking Prussia and the Order. Teutonic Grand Master Michael Küchmeister von Sternberg was forced to resign in March. His successor Paul von Rusdorf released most of the hired mercenaries; the Order was left with very few soldiers to defend itself. Joint Polish and Lithuanian forces marched north to Osterode, Teutonic forces retreated to Löbau. When it became clear that siege engines would not arrive, Jogaila ordered an advance towards the Order's fortified capital of Marienburg. His army captured Riesenburg and pillaged surrounding villages. Heading south to Chełmno Land, the Poles and Lithuanians then captured Golub, but failed to take Schönsee. Jogaila decided to end the war quickly before the overwhelmed Prussian troops of the Order could receive reinforcements from the Holy Roman Empire that Paul von Rusdorf had requested. A truce was signed on September 17, 1422, and the war concluded ten days later with the Treaty of Melno. This ended the territorial disputes and fights between Lithuania and the Teutonic Knights. Poland, however, resumed fighting with the Order once again in 1431–1435 when the Order supported Švitrigaila and not Polish-backed Sigismund Kęstutaitis as the successor of Vytautas.

Polish–Teutonic War (1431–1435)
The Polish–Teutonic War (1431–1435) was an armed conflict between the Kingdom of Poland and the Teutonic Knights. It ended with the Peace of Brześć Kujawski and is considered a victory for Poland.

Hostilities
The war broke out after Teutonic Grand Master Paul von Rusdorf signed the Treaty of Christmemel, creating an alliance with Švitrigaila, who was waging a civil war against his brother Polish King Jogaila (Władysław Jagiełło) for the throne of the Grand Duchy of Lithuania. Sigismund of Luxemburg made a commitment to the Teutonic Order in an effort to break the Polish–Lithuanian union.

In 1431, while the main Polish forces were involved in Lutsk in Volhynia, the Teutonic Knights invaded Poland. Finding little opposition, the Knights ravaged Dobrzyń Land, taking the town of Nieszawa, and tried to move on to the Kuyavia and Krajna regions. However, the Teutonic army was defeated on 13 September 1431 in the Battle of Dąbki, near Nakel (Nakło nad Notecią). In September a two-year truce was signed among Poland, Lithuania and the Teutonic Knights at Staryi Chortoryisk.

Hussite invasion of Prussia
In June 1433 Poland allied itself with the Czech Hussites in order to stop the Teutonic Order from sending secret support to Švitrigaila via its Livonian branch. The Teutonic Knights had supported the Pope and Holy Roman Emperor Sigismund against the heretic Hussites during the Hussite Wars. Czech forces under Jan Čapek of Sány were granted safe passage through Poland for their last and largest "beautiful ride." The Polish forces were also supported by Pomeranian Duke Bogusław IX of the Duchy of Stolp (Słupsk). In addition, the Moldavians, whose ruler Iliaş had been replaced by the more pro-Polish Stephen II, had joined the Polish alliance. For four months the Hussite army, including forces led by Feodor Ostrogski, ravaged Teutonic territories in Neumark, Pomerania, and western Prussia. First they unsuccessfully besieged Konitz (Chojnice) for six weeks, then moved north to Schwetz (Świecie) and Danzig (Gdańsk). They captured several towns and castles, including Dirschau (Tczew) on the Vistula River (29 August 1433). Despite their failed siege of Danzig, the Hussites reached the Baltic Sea near Oliwa at the beginning of September and celebrated their "beautiful ride" by symbolically filing their bottles with water from the sea. Returning to the south via Starogard Gdański, the expedition occupied a castle in the frontier settlement of Nowy Jasiniec.

Negotiation and conclusion of the peace
On 13 September 1433 a truce was signed at Jasiniec in force until Christmas. Polish–Teutonic negotiations continued at Brześć Kujawski, and Hussite–Catholic negotiations continued at the Council of Florence and at the Czech Diet in Prague. The Polish-led invasion of Neumark and Pomerania had proven successful, cutting the Teutonic Order off from support from the Holy Roman Empire, and convincing the Order to sign a treaty with the Poles. While the Order's leaders had been willing to fight on, the citizens of Prussia demanded an immediate end to the war. The Poles put forth several conditions: an end to the Knights' appeals to the emperor, the pope or the Council of Florence for dispute resolution; the surrender of Nieszawa; and an end to their alliance with Švitrigaila. The Knights rejected these conditions, and the Poles threatened a new invasion. Finally, on 15 December 1433, twelve-year Truce of Łęczyca was signed between the Poles and the Order at Łęczyca (leading some Polish historians to divide this Polish–Teutonic War into two wars: in 1431–1433; and in 1435). The Teutonic Knights agreed to other Polish demands, including that the Order cease its support for Švitrigaila; moreover, each side would control the territories that it occupied until a peace was signed (uti possidetis), and no party would seek mediation by foreign powers in order to alter this truce. This marked the end of the war on Polish soil; the struggle on Lithuanian lands would continue for two more years, as the truce with Poland did not extend to the Livonian Order.

Jogaila's alliance with heretics had damaged his reputation. By 1433, however, Jogaila had regained favor with the Church, particularly since Švitrigaila had allied himself with the Islamic Tatars. Jogaila received tithes from the Church (which expected him to combat the Tatars and the Hussites), and his representatives were invited to be heard before the ecumenical council at Florence.

Decisive battle
When Jogaila died in May 1434, the Order resumed its backing for Švitrigaila, who rallied his supporters, including knights from the Livonian Order, the Orthodox dukes, and his nephew Sigismund Korybut, a distinguished military commander of the Hussites. The final Battle of Wiłkomierz was fought in September 1435 near Ukmergė (Vilkomir, Wiłkomierz), northwest of Vilnius. It is estimated to have involved 30,000 men on both sides. Švitrigaila's army, led by Sigismund Korybut, was split by the attacking Lithuanian–Polish army, led by Michael Žygimantaitis, and soundly defeated. The Livonian Order had suffered a great defeat, sometimes compared to that which had been inflicted on the Teutonic Knights at Grunwald in 1410. On 31 December 1435 the Teutonic Knights signed a peace treaty at Brześć Kujawski. They agreed to cease their support for Švitrigaila, and in the future to support only Grand Dukes who had been properly elected jointly by Poland and Lithuania. The treaty did not change the borders that had been set by the Treaty of Melno in 1422. The Teutonic and Livonian Orders no longer interfered in Polish–Lithuanian affairs; instead, Poland would involve itself in the Thirteen Years' War (1454–66), the civil war that would tear Prussia in half.

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

After the enormous defeat suffered by the German Order at the hand of Poland-Lithuania in 1410 and the ensuing political, military and economic problems, the state was rife with internal conflict between the ruling Order and the native Prussian warlords, who shared concerns with assimilated Prussian and German townsfolk. Eventually this tension led to an uprising by the Prussian Confederation representing the local Prussian nobility and cities, who sought the protection of the Polish King Casimir IV Jagiellon. This essentially amounted to a switching of sides which the German Order immediately took as a mortal threat, and a war broke out between Poland and the Teutons.

The Thirteen Years' War ended in the victory of Poland and in the Second Peace of Toruń. The Teutonic Order became a Polish fief and its Grand Masters had to commit to homage to the Polish King within 6 months of acquiring power. This was honored for approximately the next two centuries with tensions rising seldomly during this period. The Teutonic Order also returned Eastern Pomerania to Poland after nearly 150 years and ceded the bishopric of Warmia, which together formed the so-called Royal Prussia, as both lands fell under direct rule of the Polish King. Tension quickly flared up afterward, and this was soon followed by the War of the Priests (1467–1479), a drawn-out dispute over the independence of Warmia, in which the Knights sought revision of the Peace. They yet again lost to Poland, which held onto its gains.

Reasons for war
A dispute between Poland and the Teutonic Order over control of Eastern Pomerania had lasted since the 1308 Teutonic takeover of Danzig (Gdańsk), when the territory was contested and annexed by the Teutonic Order. This event resulted in a series of Polish–Teutonic Wars throughout the 14th and 15th centuries. In the 15th century, the towns of Prussia rapidly grew economically. However, this was not followed by an increase in their political influence. The rule of the Teutonic Knights was seen as more and more anachronistic – taxes (customs) and the system of grain licenses (every trader had to pay large fees for the privilege of trading grain) were hindering economic development in the province. At the same time the nobility wanted a larger say in the running of the country and were looking enviously at neighbouring Poland, where the Polish nobility enjoyed wider privileges. The Knights were also accused of violating the few existing privileges of the nobility and the cities. Craftsmen were discontented because of competition from so-called partacze, or artisans settled by the Knights near their castles. Kashubians, Poles, Germans, and Prussians were slowly melting into one nation, and as national differences disappeared, the common goals of all the ethnic and social groups of Prussia became more prominent, and the Prussian estates leaned increasingly towards Poland.

In 1397 Prussian knights had founded a secret organisation called the Eidechsenbund (English translation: Lizard Union), more or less against the Teutonic Knights, but that organization had failed as it was not supported by the urban population. After the victory by the Polish and Lithuanian forces at Grunwald) during the Polish–Lithuanian–Teutonic War (1409–1411), the Prussian estates eagerly pledged allegiance to King Władysław II Jagiełło (Jogaila) of Poland. But they quickly returned to the order's rule after the Poles were unable to conquer Marienburg (Malbork). A clause in the peace treaty stated that it was guaranteed by the Prussian states, which would gain the right to defy the Teutonic Order if it broke the treaty. In the succeeding wars the Prussian estates opposed any conflict, and pushed the Grand Masters of the Teutonic Knights to make peace.

On February 21, 1440, a group made up of individuals from the Prussian cities, nobility, and clergy, formed the Prussian Confederation. The main contributors were from the nobility of Culmerland (Chełmno Land), Thorn, Culm (Chełmno), and from the Hanseatic cities of Elbing (Elbląg) and Danzig. Grand Master Paul von Rusdorf was seen to approve the existence of the confederacy, but his successor, Konrad von Erlichshausen, opposed it. His non-compromising policy was followed and intensified by Ludwig von Erlichshausen who took that office in 1449 or 1450.

1452–1454 negotiations
In 1452, the Prussian Confederation asked Emperor Frederick III for mediation in their conflict with the Teutonic Order. Disagreeing with the confederacy, Frederick banned it and ordered it to obey the Teutonic Order on 5 December 1453.

Faced with that situation the Prussians sent envoys to Poland – although the Prussian Confederation, under the influence of Thorn and the Pomeranian and Culmerland nobility, had already sought contact with the Poles. They received support, especially from Greater Poland and from the party of Queen Sophia of Halshany, mother of King Casimir IV Jagiellon of Poland. The Bishop of Kraków, Zbigniew Oleśnicki, opposed this support and tried to prevent war.

In January 1454, the year that Casimir IV was married to Elisabeth Habsburg, the Prussian faction asked Casimir IV and protection by the Kingdom of Poland. Casimir asked the Prussian Confederation for a more formal petition. On 4 February 1454, the Secret Council of the Prussian Confederation sent a formal act of disobedience to the Grand Master. Two days later the confederacy started its rebellion and soon almost all Prussia, except for Marienburg, Stuhm (Sztum), and Konitz (Chojnice), were free from Teutonic rule. Most of the captured Ordensburg castles were immediately destroyed.

On 10 February 1454, the confederacy sent an official delegation to Poland, headed by Johannes von Baysen. By 20 February, the delegates were in Kraków and asked Casimir to bring Prussia into the Polish kingdom. After negotiating the exact conditions of incorporation, the king agreed and delegates of the Prussian Confederation pledged allegiance to Casimir on 6 March 1454.

Poland sent the Grand Master a declaration of war, predated to 22 February. Both sides expected the war to end quickly.

International situation
In 1454 Poland was in conflict with the Grand Duchy of Lithuania, which meant that although Casimir IV was Grand Duke of Lithuania as well as King of Poland, Lithuania sent no aid during the war to Poland and, aside from a few ineffective raids, did not participate during the conflict. There was also the threat of attack by the Grand Duchy of Moscow.

Elsewhere, the international situation was quite good for Poland, as no outside states were likely to intervene. The southern border of Poland was more or less secure because of the weakness of the Bohemian lands, which resulted from the Hussite Wars. Although the Hanseatic League sympathized with the Prussian cities, the league backed the Teutonic Knights because the order granted them extra privileges. The Livonian Order had problems with Denmark and was unable to help the Teutonic Knights in Prussia. Because of conflict between Sweden and Denmark, both sides stayed more or less neutral in the upcoming conflict.

France and England were too weakened after the Hundred Years' War, and England was also embroiled in civil war, the Wars of the Roses. The Duke of Burgundy, Flanders, and the Netherlands, Philip the Good, was more interested in creating an independent Kingdom of Burgundy. Pope Nicholas V's primary concern was dealing with the Ottoman Turks.

Forces of belligerents
The main part of the Polish army of that period was conscripted. All noblemen, when called by the king, had to appear accompanied by their village-mayors and village-administrators. Cities gave wagons with horses, food, and service to them (including escorts). Units were divided into choragwie (standards) of two kinds: family, which were made by very large clans, and land which were from nobles from particular territory. Peasants also participated as infantrymen. The highest command belonged to the king. The total army could amount to 30,000 cavalry.

From the beginning of the 15th century, the Polish Crown started to hire mercenaries, who usually fought under the flag of St. George (especially Bohemian (Czech) mercenaries). The flag was either a red cross on white, or a white cross on red; the latter was used only when two Bohemian units met on opposite sides of a battlefield and had to be differentiated. The concept of tabor, learned from the Bohemians, was an important tactic.

The Poles had artillery, at first primitive cannons such as bombards. Pistols, or handguns, were used but were ineffective. More important were crossbows, which, when properly used, could cause large losses.

The army of the Prussian estates consisted of conscripts and small units provided by cities (around 750 people per unit). In total they could provide about 16,000 soldiers, plus a few thousand armed peasant infantry. They also had more artillery than the Polish army.

The Prussian cities were also able to raise a small navy, partially from armed trade ships, partially from hired privateers from other cities.

The Teutonic Order in 1454 lost most of its arsenals, but later it was able to raise armies from loyal knights (free Prussians) and peasants. However, most of its forces were hired mercenaries, mainly from Germany and Bohemia.

First phase
The first land operations from February to August 1454 were carried out by Prussian state conscripts, supported by Czech mercenaries from Moravia and soldiers from Lesser Poland. This force, commanded by Scibor von Baysen (Polish: Scibor Bażyński), brother of Johannes von Baysen, tried to besiege the Grand Master Ludwig von Erlichshausen in the city and castle of Marienburg, but without much success due to the professional command of Heinrich Reuß von Plauen the Elder, Komtur of Elbing.

In the meantime there was some organised support for the Teutonic Order from the German principalities, mainly in Saxony. The reinforcements entered Prussia in the second half of March 1454, from the direction of the Neumark. They were able to take the highly important strategic city of Konitz, which was situated on the important route from Poland to the mouth of the Vistula. Johannes von Baysen moved conscript and mercenary forces there, and they were soon followed by Mikołaj Szarlejski of the Clan of Ostoja, who was the representative of the Polish kingdom and received the title of "Supreme Commander of Forces in Prussia". In 1454 and 1455, the Teutonic Knights first pawned, then sold the Neumark back to the Margraviate of Brandenburg in the Treaties of Cölln and Mewe.

At the end of April 1454, the Prussian army started the siege of Konitz; the defence of the city was commanded by Heinrich Reuß von Plauen from Greitz. However, Szarlejski lacked any significant commanding skill, his army had not enough artillery, and the Prussian estates were unable to pay their mercenaries, so Konitz was not seriously endangered.

After the arrival of Casimir IV, when he received the official oath of allegiance from his new subjects in Elbing and Thorn, he directed to Konitz a pospolite ruszenie (levée en masse) of Polish nobles from Kuyavia, which replaced the unpaid mercenaries. Cavalry forces such as the nobles, however, were ill-suited to the taking of castles, so the situation in Konitz did not change. The king also sent his own units and a levée en masse to lay siege to Marienburg, but Polish forces were unable to take the castle even with Prussian reinforcements, which were relocated to Malbork after taking Stuhm on August 8, 1454. The Teutonic Knights defended themselves skillfully and were able to defeat forces from Danzig in a sudden attack on September 13.

The degrading situation of the Polish crown worsened further when in September 1454 a large army of mercenaries under the command of Rudolf, prince of Sagan (Żagań), and a Moravian nobleman, the talented soldier Bernhard von Zinnenberg (Polish: Bernard Szumborski) arrived in Prussia from the Holy Roman Empire. The army had 9,000 cavalry and 6,000 infantry, plus artillery and many wagons in tabor formations.

Rudolf's army slowly moved to Konitz to rescue it from the Polish siege. It forced Casimir to call a levée en masse of Greater Poland, without the traditional approval of the provincial sejmik. Noblemen, angered by the disruption of the harvest and the unconventional form of the call, massed near the village of Duża Cerkwica (Cerekwica, Groß Zirkwitz) and demanded from the king several privileges, which were granted in the privilege of Cerekwica on September 14, 1454.

Casimir divided his forces into seven large units and the army marched to Konitz, where it was joined by Prussians. On September 18, 1454 the Teutonic Knights defeated the Polish army in the resulting Battle of Konitz.

The defeat was a near disaster. The Polish army quickly withdrew from Marienburg, and Stuhm was recovered by the Teutonic Order. They were also able to take other large towns, such as Mewe (Gniew) and Dirschau (Tczew). Impressed by the crusaders' victory, some Prussian lands also capitulated. This was a great victory for the Teutonic Knights, although they lacked enough money to pay the victorious mercenaries. On October 9, the Grand Master promised them that if he could not pay them by February 19, 1455, they would receive all cities, castles, and lands of Prussia, with the rights to sell them.

Mercenaries later captured two other cities, Marienwerder (Kwidzyn) and Lessen (Łasin), near Marienburg. None of the largest and most important cities of Prussia, such as Königsberg, surrendered, and they were determined to continue the war. As a result, the Teutonic Order was totally dependent on help from the Holy Roman Empire.

To save the situation for Poland, Casimir started hiring more Bohemian and Silesian soldiers and sending them to the cities of Pomerania, Pomesania, and Culmerland. He also decided to call for another levée en masse from the whole Polish kingdom. The levée en masse in Opoka, this time dominated by nobility from Lesser Poland, demanded privileges similar to those given in Cerekwica; the king quickly approved them. Later on from November 11 to November 16, 1454, while under the influence of the aristocracy from Lesser Poland, Casimir changed some of the promises given earlier both in Opoka and Cerekwica through privileges for the whole country given in Nieszawa (the privilege of Nieszawa).

This time the Polish army counted almost 3,000 cavalry, plus 3,000 mercenaries. The mercenaries had a few capable commanders, such as Jan Kolda from Zampach and Jan Skalski from the northern Bohemian city of Malá Skála (literally, "little rock") and a member of the family of Valdsztejn, Waldstein, or Wallenstein.

This time the Grand Master avoided battle as too risky. The army started the siege of Lessen, whose defense was commanded by the Austrian mercenary Fritz Raweneck. However, the army was unprepared for taking castles, and the large preparations ended with another fiasco.

1455 to 1460
The first negotiations between the two sides, conducted from January 9 to January 10, 1455, were unsuccessful. The situation became difficult for Casimir. To pay his mercenaries he had to borrow from the clergy. He decided to give two cities as a fief to Eric II of Pomerania from Stolp (Słupsk), hoping it would secure northern Pomerania. To calm opposition, Casimir later went to Lithuania, where he was forced to stay until the summer of 1455.

In that situation the Teutonic Knights were able to recover the eastern part of Prussia, including the Königsberg towns of Altstadt and Löbenicht on April 17, 1455. They were aided by rebellions in the cities, caused by new large war taxes. The last East Prussian town loyal to the Polish king, Kneiphof, was taken on June 14, 1455 after a long siege by the Teutonic Knights commanded by Heinrich Reuss von Plauen the Elder. The Poles suffered defeat after defeat, and they later also lost Warmia (Ermeland).

However, the Grand Master was unable to pay his mercenaries and they took Marienburg, Dirschau, and Eylau (Iława) in May 1455. Mercenaries under the Bohemian Ulrich Czerwonka (or Oldrzych) immediately started negotiations with Poland to discuss selling the castles.

The international situation also became significantly worse. On March 25, Emperor Frederick III banned the Prussian Confederation, forbidding trade with its members. On September 24, 1455, Pope Callixtus III warned that he would excommunicate the Prussian Confederation and all its allies unless they made peace with the Order. In June 1455 the Teutonic Knights gained a new ally, King Christian I of Denmark, who declared war against Poland and the Prussian Confederation. This meant nothing more than a disturbance in trade, however, since Denmark was still busy fighting with Sweden.

Shocked by the loss of Kneiphof, Casimir, in debt and unable to hire new mercenaries, called another levée en masse. The Polish army moved slowly to Thorn, but military actions were halted briefly when the king finally agreed to mediation by Frederick II, Margrave of Brandenburg; all earlier propositions of mediation from different sides had been rejected. The elector, however, failed to negotiate a peace, because the Teutonic Knights, after recent successes, were unwilling to compromise. The Poles suggested that the Teutonic Order should leave Prussia and go elsewhere to fight with pagans; a location suggested earlier by Polish envoys to the Holy Roman Empire was Podolia, near the Tatars. Negotiations ended unsuccessfully on September 26, and the war continued.

The new Polish army was larger than before, including soldiers from Red Ruthenia, small auxiliary forces of Lithuanian Tatars, and a few mercenaries from Silesia. It laid siege to Lessen, but Raweneck was able to defend the city. Additionally, when Casimir IV ordered a further march to Graudenz (Grudziądz), the nobility refused and instead decided to pay a new tax, which would allow the king to hire more mercenaries.

After that, the situation did not change much. The Teutonic Knights were able to recover another city, Memel (Klaipėda), but their offensives in other directions were stopped by the burghers of Thorn and of Culmerland, and the leadership of Andrzej Tęczynski. In autumn 1455 the peasants of eastern Masuria, tired of the war, revolted against the Teutonic Knights but were defeated at Rhein (Ryn) on January 1, 1456. Land-based military actions were limited to raids and local skirmishes.

In the maritime arena, Casimir urged Danzig to build a fleet that would be able to break sea connections between the Teutonic Order and its allies. In May 1456 privateers hired by Danzig captured Dutch ships, which caused conflict with Amsterdam and the Duke of Burgundy, Philip the Good. In two weeks in August 1457, three ships from Danzig defeated a combined Danish–Livonian fleet of 16 ships near Bornholm.

Earlier, in 1454, Jan Janski de Turze (pl:Jan z Jani) of the Clan of Ostoja had become the first Polish Voivode of Gdańsk and Pomerania. The Clan had been fighting the Teutonic side since the days of Stibor of Stiboricz, the Duke of Transylvania and one of the most loyal Lords of King Sigismund von Luksemburg. The strategy of the Clan of Ostoja was in the beginning of 15th century not only use of military forces but also to use diplomacy in order to make the Teutonic side weaker economically, so they could not pay the mercenaries they depended on. By the time Jan Janski de Turze become voivode of Pomerania, Szarlejski of Ostoja was Voivode of Kujawy and used the help of his Clan brother to raise funds to hire mercenaries fighting on Polish side. Stibor de Poniec of Ostoja, the Lord General of Greater Poland, joined the cause in 1457. Together with his Clan brothers Jan Janski and Szarlejski, Stibor de Poniec raised new funds to hire more mercenaries to fight on the Polish side. However, Stibor decided to use those funds to pay mercenaries that defended the main stronghold of Teutonic Knights, Malbork (Marieburg), and in return asked them to leave the stronghold. In this way, the Polish side succeeded to overtake Malbork without force, in 1457. Later, in 1466 Stibor de Poniec sealed the Second Peace of Thorn, which also finally broke the power of the Teutonic Knights.

After long negotiations, Teutonic mercenaries agreed to sell three castles in Prussia, including Marienburg, to Poland. Heavy new taxes caused rebellions in Danzig and Thorn that were bloodily suppressed by the cities with help from the king's army. The Polish and Prussian estates were able to gather 190,000 Hungarian gold pieces, most of which had been borrowed from Danzig. On June 6, 1457, the castles of Marienburg, Dirschau, and Eylau were transferred to the Polish army. Two days later Casimir entered the castle of Marienburg, and its burghers paid homage to him. Ulrich Czerwonka became the first Polish sheriff of the castle, and also received three other counties. The king again granted broad privileges to the Prussian cities. It was generally expected that now, with the fall of the Teutonic Order's capital, the war would end quickly. Optimism faded, however, when the Polish army commanded by Prandota Lubieszowski was unable to take Mewe, which was again defended by Raweneck. Casimir had to return to Poland to seek money to pay his debts and mercenaries. The mood worsened when the grand master organised a new offensive. The Teutonic Knights received significant aid from the burghers of Königsberg, free Prussian knights, and others. Although they were unable to take Wehlau (Znamensk) and Schippenbeil (Sępopol), the two Polish-controlled castles that were the initial target of the offensive, they again defeated the Polish army in September 1457.

With the assistance of the town's burghers, Teutonic forces under the command of Bernard von Zinnenberg, who had been released from service with the Poles, took Marienburg by surprise on September 28, 1457; only the castle commanded by Czerwonka remained in Polish control. Lubieszowski was able to stop some further advances of the Teutonic army. However, they recaptured Eylau, which again pledged allegiance to the Teutonic Order, Culm, and Preußisch Stargard (Starogard Gdański). The situation was saved for the Poles by a new army sent from Greater Poland.

The international situation became increasingly complicated. The new Prince-Bishop of Ermeland was Cardinal Eneas Silvio Piccolomini, known for his pro-Teutonic sympathies. In 1458, Piccolomini was elected Pope Pius II. Another complication was the death of Ladislaus the Posthumous and the election of George of Poděbrady as the new (Hussite) king of Bohemia, and Matthias Corvinus as king of Hungary.

In spring 1458 Casimir IV again called for a levée en masse, which included the Masovians. Ignoring the mediation of John Giskra (Jan Jiskra), a Czech mercenary who hoped for an end to war with Prussia and the start of a new conflict with Hungary, the Polish army slowly marched into Prussia, crossing the Vistula via a pontoon bridge near Thorn in June. Again the army was supported by Tatar auxiliary forces from Lithuania and by the king's own army. The army was commanded by Piotr of Szamotuly, the castellan of Poznań. The Polish army marched directly to Marienburg, reaching the city on August 10. This time it was well equipped with artillery sent by Danzig and Elbing. The siege, however, was another fiasco, due partly to lengthy negotiations, and partly to Piotr's lack of aggression on the battlefield. His inept leadership allowed Fritz Raweneck to take yet another castle. The nobles demanded the storming of the castle, and when this did not happen, they started deserting and returning to Poland.

In Lower Prussia, there was a peasant rebellion against Polish rule. The peasants captured a few castles and gave them to the Teutonic Knights, declaring that they were ready to fight on the Teutonic Order's side against Poland.

In the meantime the king, using John Giskra as mediator, negotiated with the Teutonic Knights. The Poles again proposed that the Teutonic Order should leave Prussia for Podolia. The crusaders agreed on a mission to Podolia, but refused to leave Prussia. Danzigers proposed a compromise that would leave part of Prussia for the Teutonic Order. At one point there was a signed cease fire lasting nine months – there was even a signed treaty, and John Giskra as the mediator was to keep Marienburg – and peace appeared certain, but the Prussian estates decided to persuade the king to break off negotiations.

One positive sign was peace with Denmark. King Christian I of Denmark finally conquered Sweden, but the Swedish king Charles VIII escaped to Poland and started supporting the Polish cause financially. Danzig and Charles VIII began hiring more privateers, which seriously damaged Baltic trade, and finally Christian I decided to sign a ceasefire in July 1458, which was extended to four years in May 1459, and then to 20 years.

In 1459, Johannes von Baysen died, and his brother, Scibor, became the new governor of Prussia. The Teutonic Knights raided Polish lands and achieved a few successes, notably Komtur Kaspar Nostitz of Konitz's capture of a Polish city in northern Greater Poland for a few months. There were other attempts at mediation, such as by dukes of Bavaria and Austria, as well as by bishops from Livonia, but they were all refused by Poland. More serious mediation was undertaken by Pope Pius II, who was trying to mount a coalition against the Ottoman Turks. He suspended the ban over the Prussian Confederation and explicitly stated that the forementioned ban was also against Poland. That statement outraged Casimir, who rejected the arrival of the papal legate, Hieronymus Landus. On June 3, 1460, the pope reactivated the ban against Prussia, Poland, and the Polish king. At the same time the Bohemian king George of Poděbrady banned and jailed Ulrich Czerwonka and his comrades, and agreed to hire Teutonic soldiers in the territory of his kingdom.

On 21 March 1460, the Polish army, supported by Danzigers and peasants, began a siege of the town of Marienburg; the town's Malbork Castle was already in Polish control. This time the army had a more capable commander, Lubieszowski, and enough artillery. Lubieszowski died during the siege and was replaced by Jan Koscielecki with Johann Meydeburg of Danzig as his advisor. The town of Marienburg finally capitulated on 5 July. Marienburg's mayor, Burgomaster Blume, was hanged as a traitor, since he had pledged allegiance to the Polish king but later opened the gates of Marienburg to the Teutonic Knights.

This Polish success was quickly countered by the Teutonic Knights, who regained other cities in western Prussia. They defeated the army of Danzig near Praust (Pruszcz Gdański) in July 1460, and burnt the suburbs of Danzig; the Hanseatic city then asked Casimir for help. The Teutonic Order also conquered Lauenburg (Lębork) and Bütow (Bytów), which had been in the possession of Eric II of Pomerania, Leba (Łeba), and Putzig (Puck); the latter was garrisoned by mercenaries hired by the former Swedish king Charles VIII. Bernard von Zinnenberg also captured the castle of Schwetz (Świecie). Thorn immediately sent soldiers there, who, helped by the king's army, started a siege. In the Bishopric of Warmia, the administration of Paul von Legensdorf commenced. He was appointed by the pope, and promised neutrality between the Teutonic Knights and the Polish king. The neutrality of Legendorf made him popular amongst the burghers and peasants, who were tired of war.

The situation of Poland became desperate. One by one, the castles and cities in Prussia were recovered by the Teutonic army. The internal situation was pessimistic because of the conflict between the pope and the king over nominating the new bishop of Kraków, since both king and pope were convinced that the other lacked the right to choose the new bishop.

The Polish king again called for a levée en masse, but most of the nobility refused to participate after Tęczynski was killed in Kraków by burghers in a dispute over payment for his armor. Commanders, amongst them Piotr of Szamotuly, were disorganized, and, after raids to Eric II's Duchy of Pomerania, the army returned home after a few weeks. The failure of the latest levée en masse and the Teutonic recovery of Warmia, capturing the last Polish points of resistance, convinced Casimir that the war should be left to professionals. The nobility agreed to pay new taxes for the hiring and maintaining of a more regular army. The new commander was Piotr Dunin, an innovative leader from Prawkowice.

Second phase
In 1461, Poland achieved a major success with the capture of the castle of Schwetz. Polish privateers hired by Danzig were also successful, even though they were fighting not only Teutonic ships and privateers, but also ships from Lübeck. The first group of Polish army regulars – initially around 2,000 soldiers – came to Prussia around October 1461, under Dunin. Almost immediately Dunin achieved two successes, capturing the castles of Lessen and Stuhm. The Teutonic Knights at the same time captured a few cities and castles, such as the town of Strasburg (Brodnica), although the castle stayed in Polish hands, and Stargard. The Sejm in Nowe Miasto Korczyn in Lesser Poland decided to raise new taxes for increasing the Polish regular army. It was only in the summer of 1462 when Dunin finally, after losing the castle of Strasburg, could start any more serious action. His first success was the conquest of the castle of Frauenburg (Frombork) and burning Fischhausen.

Casimir was unable to profit from the Polish successes because of troubles in Lithuania. The Lithuanians rejected the idea of moving the Teutonic Order to Podolia, even if Lithuania would acquire territories in Prussia. This forced the king to open new negotiations with the Teutonic Order, with the Hanseatic League as mediators. On July 3, 1462, negotiations started in Thorn. The Polish negotiators included Jan Długosz and the rector of the Kraków Academy, Jan of Dąbrówka. The Prussian representatives included Gabriel von Baysen and Scibor von Baysen, as well as envoys from larger cities. The Poles and Prussians argued that "Pomerania from time immemorial belonged to Poland, pointing out Slavic names in Pomerania, the Slavic language of inhabitants", the "tax of St. Peter" paid by Pomerania, and that Pomerania belonged to the Polish Diocese of Włocławek. They also strongly emphasized that Prussians of their own will asked for the incorporation of Prussia into Poland. They also tried to prove that even eastern Prussia was, in times past, tied in some way to Poland. The Teutonic Knights questioned all the arguments and past papal judgments. Instead, they strongly underlined that Poland had officially resigned all claims to Pomerania and Culmerland, and also pointed to the emperor's statement of 1453 when he forbade all opposition in Prussia. Hanseatic mediators proposed a ceasefire for 20 years, but this was refused. The Poles again proposed moving the Teutonic Order to Podolia, which was also rejected. Unofficially, the Poles unsuccessfully proposed leaving the Teutonic Order in Sambia as Polish vassals. Finally, the Poles demanded at least Pomerelia, Culmerland, Marienburg, and Elbing, and when this was rejected too, negotiations broke down. The Battle of Świecino (Schwetz), where the excellent Teutonic commander Fritz Raweneck was killed, changed the course of the war. After that battle the Poles, supported by Ulrich Czerwonka, released from Bohemian imprisonment, were able to take the offensive. On July 27, 1463, Dunin began the siege of Mewe. Because of the great strategic importance of the city and castle, the Grand Master of the Teutonic Order sent reinforcements. The Teutonic army, under commanders von Plauen, von Zinnenberg, and the grand master, gathered in Stargard. On September 15, 1463, 44 ships of the Teutonic navy were destroyed by 30 ships from Danzig and Elbing in the Battle of Zatoka Świeża. Soon after the battle, von Zinnenberg, with approval of the Teutonic Order, made a treaty with Poland, withdrawing from the war but retaining in his possession a few castles in Culmerland. Mewe capitulated on January 1, 1464.

The Teutonic Knights began to have serious financial problems. Every year they received less money from the Holy Roman Empire. Their mercenaries, the core of the Teutonic army, were not paid and refused to make any serious offensives. At the same time the armies of Poland and the Prussian Confederation (mainly Danzig) were continuing their offensive.

Dunin continued on the offensive, capturing more and more castles. Masovians, enraged by Teutonic raids, organised a levée en masse and captured the castle of Soldau (Działdowo), but again the king had to leave Poland for Lithuania, and financial problems stopped further advances. This caused another round of negotiations in 1465, which were again unsuccessful.

In 1466 the Prince-Bishop of Warmia, Paul von Legensdorf, decided to join the Polish forces and declare war on the Teutonic Knights. Polish forces under Dunin were finally also able to capture Konitz on September 28, 1466.

The Polish successes caused the exhausted Teutonic Order to seek new negotiations, which were well documented by the chronicler Jan Długosz. The new mediator was Pope Paul II. With help from the papal legate, Rudolf of Rüdesheim, the Second Peace of Thorn was signed on October 10, 1466. Western Prussia became an autonomous Polish province, later known as Royal Prussia; the Bishopric of Warmia also came under the crown of Poland. Eastern Prussia remained under the control of the Teutonic Knights, although it became a vassal of the Polish king. The Grand Master received the title of Senator of the Polish kingdom. The treaty was signed by the papal legate. "Both sides agreed, that although the Pope's approval was not necessary, they would ask him to confirm the treaty so as to ensure it". The treaty was later disputed by Pope Paul II and Emperor Frederick III.

War of the Priests (1467-1479)
The War of the Priests (1467–1479, German: Pfaffenkrieg, Polish: wojna popia, wojna księża) 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 Poland and a year later Heinrich Reffle von Richtenberg, the grand master of the order, refused to provide military support to Casimir, his sovereign.

Casimir responded by courting the support of the Prussian Estates and cities. He granted Chełmno Law to several cities, affirmed existing privileges and withdrew the candidature of Oporowski. As a result, the Prussians re-swore their fealty to the king of Poland and refused to support the order. Likewise, Gdańsk, the largest city in Polish Royal Prussia declined to support to the Order and Corvinus.

Military action
In 1477 Martin von Wetzhausen, the new grand master of the order refused to make his oath of fealty to the Polish king and invaded Warmia, taking Chełm and Starogard Chełminski. In response, in 1478, Polish forces of King Casimir IV intervened militarily, besieging Braniewo. Under the command of Jan Biały and Piotr Dunin, the Polish forces occupied several cities in Warmia and Pomesania. The Teutonic Knights' military operations were hampered by the refusal of the Prussian Estates to support them. Tüngen was forced to flee to Königsberg (Królewiec). At the same time, in April 1479, the Polish and Hungarian kings came to an agreement and Corvinus withdrew from the anti-Polish alliance.

As a consequence by July 1479, both Tüngen and the grand master were forced to pay homage to the Polish king.

Settlement
The first Treaty of Piotrków (in Piotrków Trybunalski) ended the feud in 1479. The Polish king accepted Nicolaus von Tüngen, who had been elected in 1467, as bishop, and granted or confirmed several prerogatives of the bishopric. The bishop acknowledged the sovereignty of the Polish king over Warmia, obliged the chapter to elect only candidates "liked by the Polish king" and the Warmians had to pledge allegiance to him. Politically Warmia remained under lordship of the Polish crown.

Polish–Teutonic War (1519–1521)
The Polish–Teutonic War of 1519–1521 (German: Reiterkrieg, lit.  'Rider's War', Polish: Wojna pruska, lit.  'Prussian War') was fought between the Kingdom of Poland and the Teutonic Knights, ending with the Compromise of Thorn in April 1521. Four years later, under the Treaty of Kraków, part of the Catholic Monastic State of the Teutonic Order became secularized as the Duchy of Prussia. The reigning Grand Master Albert of Hohenzollern-Brandenburg-Ansbach became the first Duke of Prussia by paying the Prussian Homage as vassal to his uncle, Polish king Sigismund I the Old.

Prelude
After the Second Peace of Thorn (1466), the Teutonic Order was under Polish suzerainty. In the late 1490s, the Order developed the idea of electing only an Imperial Prince as future Grand Master, who as subject to the Emperor could resist having to pay homage to Kings of Poland. The Order was present not only in Prussia but throughout the Empire, and it was also subordinate to the Holy Roman Emperor, who had objected since 1501 to Duke Frederick of Saxony, Grand Master of the Teutonic Order and Reichsfürst, offering tribute to the Polish king. Frederick died in December 1510, and Albert of Hohenzollern was chosen as his successor early in 1511 in the hope that his relationship to his maternal uncle, Sigismund I the Old, Grand Duke of Lithuania and King of Poland, would facilitate a settlement of the disputes over eastern Prussia. The new Grand Master, aware of his duties to the empire and to the papacy, refused to submit to the crown of Poland. As war over the Order's existence appeared inevitable, Albert made strenuous efforts to secure allies and carried on protracted negotiations with Emperor Maximilian I.

In the meantime, however, the Order had been looking for other allies. In 1512, Muscovy invaded the Grand Duchy of Lithuania, which was in personal union with Poland. The Order was supposed to help the Duchy, but it refused, angering Sigismund I. In 1517, the Teutonic Order signed an alliance with Vasili III of Muscovy. Albert now felt he held the upper hand and demanded from the Polish king the return of Royal Prussia and Warmia territories, as well as a large remuneration for "Polish occupation" of those territories. In response, first the diet of Prussia (Landtag or sejmik), and then, in December 1519, the Polish General Sejm, declared that a state of war existed between the Polish Kingdom and the Order. Lithuania refused to aid Poland, however, as it was focused on the Muscovite threat.

The war
Polish forces under Grand Crown Hetman Mikołaj Firlej gathered near Koło and in January struck towards Pomesania towards Königsberg, laying siege to Marienwerder (now Kwidzyn) and Preußisch Holland (now Pasłęk). The siege was slow, however, since the Polish forces lacked artillery power. The Polish fleet began a blockade of Teutonic ports. The Knights, in the meantime, took the Warmian city of Braunsberg (now Braniewo). The Polish army received artillery reinforcements in April and took Marienwerder and Preußisch Holland that month, but failed to retake Braunsberg.

The war grew, with Polish forces from the Duchy of Masovia and Gdańsk striking the nearby Teutonic fortifications. Teutonic forces were on defense, waiting for reinforcements from Germany, which arrived in the summer of 1520. In July, the Teutonic army started an offensive, attacking Masovia, Warmia, and Łomża territories, laying siege to Lidzbark Warmiński. In August, another group of German reinforcements attacked Greater Poland, taking Międzyrzecz. The Germans took Wałcz, Chojnice, Starogard Gdański, and Tczew and started a siege of Gdańsk, but they retreated when faced with Polish reinforcements and plagued by financial troubles (German reinforcements, mostly mercenaries, refused to fight until paid). Polish forces retook Tczew, Starogard, and Chojnice. The Teutonic Knights retreated towards Oliwa and Puck, pursued by Polish forces. The Polish side was then struck with financial troubles, and the "pospolite ruszenie" forces were also tired. The Teutonic Knights seized their chance and launched a counteroffensive, taking Nowe Miasto Lubawskie and approaching Płock and Olsztyn. Olsztyn was successfully defended by the Poles under the command of Nicolaus Copernicus.

At that point, the Ottoman Empire invaded Hungary, and the new Holy Roman Emperor, Charles V, demanded that the Teutonic Knights and Poles stop their hostilities and aid the defense of Europe against the infidels. Both sides, tired with the war, agreed to an armistice on 5 April 1521 in the Compromise of Thorn.

Aftermath
During the four-year truce, the dispute was referred to Emperor Charles V and other princes, but no settlement was reached. Albert continued his efforts to obtain help in view of the inevitable end of the truce.

Eventually, in Wittenberg, Albert met and was advised by Martin Luther to abandon the rules of his Order, to marry, and to convert Prussia into a hereditary duchy for himself. Albert agreed and converted to Lutheranism in 1525. He resigned from the Hochmeister office to assume from his uncle Sigismund I the Old the Prussian Homage, the hereditary rights to the now-secularized Duchy of Prussia, as a vassal of the Polish Crown. The Prussian Landtag diet assembled in Königsberg, where all "Stände", led by the influential Bishop of Samland George of Polentz, embraced both the new Duke and Protestant Reformation to Lutheran faith. Thus the Order was ousted after facing a century of opposition by the Prussian Confederation. The Order elected a new Grand Master who tried to fight the loss of power in the Prussian territories by political means, but could never regain any influence there.