Charles V continued to battle the French and the Protestant princes in Germany for much of his reign. After his son Philip married Queen Mary of England, it appeared that France would be completely surrounded by Habsburg domains, but this hope proved unfounded when the marriage produced no children. In 1555, Paul IV was elected pope and took the side of France, whereupon an exhausted Charles finally gave up his hopes of a world Christian empire. He abdicated and divided his territories between Philip and Ferdinand of Austria. The Peace of Augsburg ended the war in Germany and accepted the existence of the Protestant princes, although not Calvinism, Anabaptism, or Zwingliism. Germany would enjoy relative peace for the next six decades. On the eastern front, the Turks continued to loom large as a threat, although war would mean further compromises with the Protestant princes, and so the Emperor sought to avoid that. In the west, the Rhineland increasingly fell under French influence. After the Dutch revolt against Spain erupted, the Empire remained neutral; de facto allowing the Netherlands to depart the empire in 1581, a succession acknowledged in 1648. A side effect was the Cologne War, which ravaged much of the upper Rhine. The Empire after the Peace of Westphalia, 1648 After Ferdinand died in 1564, his son Maximilian II became Emperor, and like his father, accepted the existence of Protestantism and the need for occasional compromise with it. Maximilian was succeeded in 1576 by Rudolf II, a strange man who preferred classical Greek philosophy to Christianity and lived an isolated existence in Bohemia. He became afraid to act when the Catholic Church was forcibly reasserting control in Austria and Hungary and the Protestant princes became upset over this. Imperial power sharply deteriorated by the time of Rudolf's death in 1612. When Bohemians rebelled against the Emperor, the immediate result was the series of conflicts known as the Thirty Years' War (1618–48), which devastated the Empire. Foreign powers, including France and Sweden, intervened in the conflict and strengthened those fighting Imperial power, but also seized considerable territory for themselves. The long conflict so bled the Empire that it never recovered its strength. At the Battle of Vienna (1683), the Army of the Holy Roman Empire, led by the Polish King John III Sobieski, decisively defeated a large Turkish army, ending the western colonial Ottoman advance and leading to the eventual dismemberment of the Ottoman Empire in Europe. The HRE army was half Polish/Lithuanian Commonwealth forces, mostly cavalry, and half Holy Roman Empire forces (German/Austrian), mostly infantry. The cavalry charge was the largest in the history of warfare. The actual end of the empire came in several steps. The Peace of Westphalia in 1648, which ended the Thirty Years' War, gave the territories almost complete sovereignty. The Swiss Confederation, which had already established quasi-independence in 1499, as well as the Northern Netherlands, left the Empire. Although its constituent states still had some restrictions—in particular, they could not form alliances against the Emperor — the Empire from this point was a powerless entity, existing in name only. The Habsburg Emperors instead focused on consolidating their own estates in Austria and elsewhere.