The Black Death, a plague that ravaged Europe from 1347 to 1351, did not significantly affect Poland, and the country was spared from a major outbreak of the disease. The reason for this was the decision of Casimir to quarantine the nation's borders. Furthermore, the concept of Golden Liberty began to develop under his rule – in return for military support, the king made a series of concessions to the nobility and establishing their legal status as superior to that of the townsfolk. When Casimir the Great died in 1370, leaving no legitimate male heir, the Piast dynasty came to an end.