In the Thirty Years' War, Frankfurt was able to maintain its neutrality; the city council had avoided siding with one opponent or another after its negative experiences in the Schmalkaldic War. This issue became critical between 1631 and 1635, when the Swedish regent Gustav Adolf came to Frankfurt demanding accommodation and provisions for himself and his troops. But the city mastered these adversities more easily than what was to follow the war: the plague ravaged the city, as it would most of Europe at this time. In the 1648 Peace of Westphalia, Frankfurt was confirmed as an Imperial Free City, and soon reached new heights of prosperity. The Palais Barckhaus at Zeil in Frankfurt even served as residence of Emperor Charles VII until 1744.