In the late-18th-century Partitions of Poland, the town was annexed by Prussia. In 1807 it was regained by Poles and included with the short-lived Duchy of Warsaw, and in 1815 it fell to the Russian Partition of Poland. In the 19th century the population of the town increased significantly.
During the late 18th-century partitions of Poland, the town was annexed by Prussia. In 1807, it was regained by Poles and included in the short-lived Duchy of Warsaw.  In 1815, it fell to the Russian Partition of Poland. During the 19th century, the town's population expanded significantly.