With the Unification of Germany, the town became part of the German Empire in 1871 and from 1887 was the capital of the Dirschau district in the Province of West Prussia. 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.