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 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 localSwenzones 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 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. 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, 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.