succession as Countess of Tyrol. However, the situation again worsened when young John Henry turned out to be a haughty, incompetent co-ruler and philanderer disrespected by the Tyrolean aristocracy. His brother Charles temporarily acted as a regent; however, his mediation efforts were rejected and in 1336/37 he left Tyrol to join his father on a Prussian Crusade. When on the evening of 1 November 1341 John Henry came home from hunting, Margaret refused her husband admittance to their Tirol Castle residence. Furious, John Henry moved around the country, but found no shelter in any noble residence. He finally was forced to leave the Tyrolean lands and was received as a refugee by the Aquileia patriarch Bertram of St. Genesius. Margaret again played the rivalling dynasties off against each other and escaped the revenge of the deprived Luxembourgs by turning to the House of Wittelsbach: in the presence of Emperor Louis IV, she married his eldest son Margrave Louis I of Brandenburg on 10 February 1342 in Meran. The fact that she entered the marriage without being granted a divorce from John Henry caused a veritable scandal on the European stage and earned the couple the excommunication by Pope Clement VI. Margrave Louis succeeded in gaining the support of the Tyrolean nobles and took it upon himself to declare Margaret's marriage to John Henry null and void. The scholars William of Ockham and Marsilius of Padua defended this "first civil marriage" of the Middle Ages, claiming that John Henry had never consummated his matrimony. Margaret's former brother-in-law Charles IV, elected German anti-king in opposition to Emperor Louis in 1346, campaigned in Tyrol the next year and laid siege to Tirol Castle; however, he had to pull out without success, though not without burning down the cities of Bozen and Meran out of revenge. After the emperor's death in October, Charles was able to consolidate Luxembourg rule and abandoned his hostile attitude. He gave in and dissolved the marriage of his brother with Margaret according to canon law, to obtain papal agreement for John Henry's remarriage to Margaret of Opava, daughter of the Přemyslid duke Nicholas II in 1349. The countess forged a new alliance by the marriage of her son by Louis, Meinhard III, to Margaret of Habsburg, the youngest daughter of the Austrian duke Albert II. With the assistance of the Habsburgs, the countess and her second husband were finally