Another rapid development of the town occurred during the rule of Casimir II, who invested in infrastructure of the town and erected defense walls around Cieszyn. Casimir II also founded a new market square and donated buildings for a new city council which serve the city to this day. In the 16th century the town became an important centre of trade and commerce, with significant manufacture of arms and jewelry. It also became a centre of the Reformation. The town gradually developed until the 17th century, when it was heavily damaged during the Thirty Years' War. As a result of the war, economic and demographic decline followed in the whole Duchy.