The town became seat of a legal district in political district of Teschen, in 1868 it was elevated to become a seat of a separate Freistadt political district. According to the censuses conducted in 1880–1910 the population of the town grew from 2,960 in 1880 to 5,058 in 1910 with a majority being Polish-speakers (at least 53.8% in 1880, at most 76.8% in 1890, then dropping to 59.5% in 1910), accompanied by German-speaking (at least 21.6% in 1890 then growing to 1,704 or 35.3% in 1910) and Czech-speaking minority (at most 546 or 18.8% in 1880, then dropping to 46 or 1.5% in 1890 and growing to 253 or 5.2% in 1910).
The town became the focal point of a judicial region within Teschen's administrative area in 1868. Subsequently, it was elevated to become the center of its own distinct district. The population grew from 2,960 in 1880 to 5,058 by 1910. A majority of residents were Polish-speaking (at least 54% in 1880 and up to 77% in 1890), accompanied by smaller groups consisting of German-speaking (around 22% in 1890 and 35% in 1910) and Czech-speaking individuals (up to 19% in 1880, down to 2% in 1890, and increasing to 5% by 1910).