 The settlement adopted Kulm law in 1291 while under the rule of the monastic state of the Teutonic Knights.The oldest building parts of the Catholic St. Nicholas' Church stem from the end of the 13th century.The Holy Spirit Church, which apparently was founded already during the 13th century, is mentioned together with the town's hospital for the first time in 1345.