During the Thirty Years' War Goslar at first tried to stay neutral, but then leaned towards the emperor's side. On 4 February 1622 there was an uprising led by the weavers against the town's rulers sparked by inflation during the Kipper und Wipper period. Although the dispute was settled at the last moment, it led to attacks against minters and Jews. Attempts by Christian the Younger of Brunswick-Wolfenbüttel, to seize the town in the night of 5 March and on 15 March 1626 were repulsed. Instead the council, in particular Mayor Henning Cramer of Clausbruch, made contact with Count Tilly, Albert of Wallenstein and the court in Vienna, both to spare the city from harm and to have the Treaty of Riechenberg revised. As part of the Edict of Restitution in 1629, monasteries of the Catholic orders were returned, and the cathedral and Kaiserhaus signed over to the Jesuits in 1630. When the army of Gustavus Adolphus advanced, Goslar was occupied by Swedish troops from 1632 to 1635. In the negotiations between Emperor Ferdinand III and Duke Augustus of Brunswick-Wolfenbüttel, which ended in the Goslar Accord of 1642, Goslar's loyalty to the emperor was not rewarded: The Rammelsberg remained in the possession of the House of Welf.