 As the town became part of the Kingdom of Prussia in 1701, it was peripheral in the new state and wasn't able to rebuild itself and return to its former prosperity, because the trade traffic on the Warsaw-Königsberg route froze as the result of the end of Polish suzerainty over the town and the region north of the town to Königsberg.The 18th-century border of Poland ran in close proximity, south of the town.During the Napoleonic Wars, in 1806-1807, the Baroque town hall and the old granaries were burnt down.