In the 11th century Polish monarch Władysław I Herman erected a church at the site. The settlement's name comes from the Old Polish word "kłoda". It gained municipal rights on August 9, 1430 by the decree of King Władysław II Jagiełło. It was a royal city of Poland, administratively located in the Łęczyca Voivodeship in the Greater Poland Province of the Polish Crown. In 1455 King Casimir IV Jagiellon exempted the town from customs duties, contributing to its growth. It was the second largest city of the Łęczyca Voivodeship at the time, just behind Łęczyca. The town was badly damaged in the 1650s by the invading Swedes during “The Deluge”. Many of the inhabitants were slaughtered. Despite outside assistance, reconstruction took a very long time. In the 18th century, General Ernest Chryzostom Dorpowski funded a Baroque monastery with the Church of the Assumption of Mary, which remains the greatest historic landmark of the town.