 Grand Master Winrich von Kniprode granted the surrounding settlement town privileges according to Kulm law in 1359.Olsztynek became the seat of the local administration within the State of the Teutonic Order.During the Polish–Lithuanian–Teutonic War, the 1410 Battle of Grunwald (known as the (First) Battle of Tannenberg in German sources) took place in the vicinity of the town, whereby the Knights suffered a historic defeat.