 Between the 16th and 17th centuries it was an important centre of Polish Protestants.After 1624, it often changed owners, it was the property of Potocki, Rej, Górski, Radziwiłł, Zaleski, Malechowski, Sapieha and Kwilecki families.After the Partitions of Poland it was annexed by Prussia.