 During the Napoleonic Wars and the Polish national liberation fights the town was captured by Polish troops of General Jan Henryk Dąbrowski in 1807, but became Prussian again in 1815.It became part of the German Empire in 1871.The town grew rapidly during the 19th century after the opening of the Prussian Eastern Railway line connecting Berlin and Königsberg, with the Vistula bridge near Dirschau being an important part.