Upon the 1411 Peace of Thorn, the Teutonic Knights had a lady chapel erected at the site, where Ulrich von Jungingen was killed in the battle. After the 1525 Prussian Homage, the area became part of the Duchy of Prussia, an autonomous fief of the Polish Crown. Ravaged by Lipka and Crimean Tatar forces during the Deluge of the Second Northern War in 1656, Stębark, along with Masuria, was annexed by the Kingdom of Prussia in the 1772 First Partition of Poland and incorporated into the Province of East Prussia.