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.
[18] According to Błażej Śliwiński at the time of events, Gdańsk with surrounding settlements had around 2000 to 3000 inhabitants[19] 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.
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.
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.
[24] 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.
[26] 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.
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.
[citation needed] 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.
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.
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.
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.
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.
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.
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.
Jogaila unsuccessfully appealed to Pope Martin V. 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.
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.
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.
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.
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.
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 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.
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.
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.
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.
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.
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 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.
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.
[74] 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.
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.