but this time by Pope Gregory IX. In AD 1219, Stuttgart (then Stuotgarten) became a possession of Herman V, Margrave of Baden. In addition to Backnang, Pforzheim, and Besigheim, Hermann would also found the Stuttgart we know today in c. 1220. In 1251, the city passed to the Ulrich I von Württemberg as part of Mechthild von Baden's dowry. His son, Eberhard I "the Illustrious", would be the first to begin the many major expansions of Stuttgart under the House of Württemberg. Eberhard desired to expand the realm his father had built through military action with the aid of the anti-king Henry Raspe IV, Landgrave of Thuringia, but was thwarted by the action of Emperor Rudolph I. Further resistance by Eberhard I against the Emperor's created Vogts and Bailiwicks as well as the newly appointed Duke of Swabia Rudolf II, Duke of Austria, eventually led to armed conflict and initial successes upon Emperor Rudolph I's death in 1291 against the Emperor's men. After initially defeating his regional rivals, Henry VII, newly elected as Emperor, decided to take action against Eberhard I in 1311 during his war with the Free imperial city of Esslingen by ordering his Vogt, Konrad IV von Weinberg, to declare war on Eberhard I. Eberhard I, defeated on the battlefield, lost Stuttgart and his castle (razed in 1311) to Esslingen and the city was thus managed by the city state from 1312 to 1315. Total destruction of the county was prevented by Henry VII's death on 24 August 1313 and the elections of Louis IV as King of the Germans and Frederick III as anti-king. Eberhard seized the opportunity granted to him by the political chaos, and recaptured his hometown and birthplace in 1316, and made much territorial gain. With peace restored at last, Eberhard began repairs and expansion to Stuttgart beginning with the reconstruction of Wirtemberg Castle, ancestral home to the House of Württemberg, in 1317 and then began expansion of the city's defenses. The early 1320s were important years for Stuttgart: Eberhard I moved the seat of the county to the city to a new and expanded castle, the collegiate church in Beutelsbach, where previous members of the Württemberg dynasty had been buried prior to its destruction in 1311, moved to its current location in Stuttgart in 1320, and the town's Stiftkirche was expanded into an abbey, and the control of the Martinskirche by the