The town was annexed by Austria in the Third Partition of Poland in 1795. In 1809, Poles led by General Józef Zajączek defeated the Austrians in the Battle of Kozienice, and the town then became part of the short-lived Polish Duchy of Warsaw. After its dissolution in 1815 it fell to the Russian Partition of Poland. In 1867, for the first time in history, Kozienice became the seat of a county. A road to Radom was built, as well as barracks of the Imperial Russian Army. In 1897 it was inhabited by 6,391 people (including 3,764 Jews). In 1918 Poland regained independence and the town was reintegrated with the reborn state.