Fighting of the Austro-Polish War of 1809 caused damage to the city. Following the Polish victory, it became part of the short-lived Polish Duchy of Warsaw and after 1815 it found itself in the Russian Empire (Congress Poland). At this point it had just 2640 inhabitants.
