 As part of Bohemia, in 1526 it became part of the Habsburg Empire and experienced a wave of witch trials in the 17th century.As a result of the First Silesian War, the city was annexed by Prussia and, in 1871, became part of Germany, until the end of World War II in 1945.In accordance with the Potsdam Agreement, the province was handed over to Poland and resettled with Poles, most of whom came from Central Poland, but some also had been expelled from the Eastern Borderlands.