Mentioned in the sources in 1378; received town rights before 1400; from the 16th c. owned, among others, by the Unrug family; one of the most important cloth making centres in Wielkopolska in the 16th-18th c.; a significant Protestant centre by the end of the 16th c.; Jewish and German settlement in the 16th-17th c.; in the years 1793-1920 under Prussian partition (1807-15 in the Duchy of Warsaw). The town was bought by the Prussian government; significant influx of German settlers; a trade centre with a river harbour in the 19th c.; development of industry (among others, machine factories) from the mid-19th c.; a railway junction  form the second half of the 19th c. (a railway link from 1887); inhabitants participated in the Wielkopolska Uprising of 1918-19; between 1920 and 1939 a border town. During German occupation of 1939-45 incorporated into the Third Reich; a labour division of the German prison in Wronki (ca. 600 people). In the periods from the 19th c. until 1975 and since 1999 a county seat.

The entry was prepared on the basis of source materials of PWN (Polish Scientific Publishers).