 The settlement gained municipal rights on August 9, 1430 by the decree of King Władysław II Jagiełło (Jogaila).The town was badly damaged in the 1650s by the invading Swedes during “The Deluge”.Despite outside assistance, reconstruction took a very long time.