 Leiden did this in order to protect itself against the Spanish in the Eighty Years' War, which had come to envelope the entire country.The town was rebuilt by 1650.During the 19th century, the town saw some changes.