War with Swedish Empire, known as The Deluge, was disastrous for the town. In 1656, after a major battle took place nearby, the town was captured by the Swedes, looted and burnt to the ground. The monastery survived and after the war ended, the monks returned to the town and started its reconstruction. On November 8, 1670, the king Michael I granted the town the privilege of organizing a market and fair once a week. This helped the monks to repopulate the town with new Polish settlers, mostly from over-populated Masovia.