In the late 17th and early 18th centuries Pietism became widespread throughout the Duchy as a response to the perceived hedonism of Baroque society and attempt at a French absolutist state. They interpreted the social and natural calamities faced by the Württemberg as God's punishment for the immorality of the Ducal court and society and worked to uphold the Estates of Württemberg and co-operation between it and the Duke. After the 1713 Treaty of Utrecht that ended the War of the Spanish Succession, the Duchy enjoyed a period of peace and increasing fortune, and Württemberg Pietism's character shifted from moral and philosophical criticism of society to quiet theological contemplation.