After the Teutonic Knights during the 13th century had conquered the Prussian territories and incorporated them into the Order's State, the castle of Marienburg served as the seat of the Grand Masters.
The cities of Elbląg, Malbork, Sztum and Tolkmicko were members of the Confederation,[3] whereas Dzierzgoń also sided with Poland in the war.
[4] The Teutonic Knights had to withdraw from Malbork to Königsberg and after their final defeat lost the castle and the surrounding territory in the 1466 Second Peace of Thorn.
King Casimir IV Jagiellon of Poland established the Malbork Voivodeship, including the towns of Elbing (Elbląg), Stuhm (Sztum) and Christburg (Kiszpork/Dzierzgoń).
Malbork Castle was occupied twice by troops of the Swedish Empire: during the Thirty Years' War 1626–1629 and again from 1656 to 1660 during the Deluge.