# 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.

## Background
### 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 of Austria, the Prussian faction asked Casimir IV for 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.

## Overview
### 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.