In 1660, it was bought by the Austrian chancellor Baron George Abraham von Dyhrn (1620–1671) of the Dyhrn family. In 1663, it was officially renamed from its Polish name to "Dyhernfurth", after the Dyhrn family, and was granted town privileges by Emperor Leopold I of Habsburg. The baron made efforts to expand the new town, opening a Catholic school for boys and building a chapel under the patronage of St. Hedwig. The year 1668 saw the construction of a wooden pipe to draw water directly from the river into town.