The longest war in German history became, with the intervention of major powers, a global war. The cause was mainly the conflict of religious denominations as a result of the Reformation. Thus, in the southwest of the empire, Catholic and Protestant princes faced one another as enemies—the Catholics (Emperor, Bavaria) united in the League, and the Protestants (Electorate Palatine, Baden-Durlach, Württemberg) in the Union. Unlike his predecessor, the next duke, Johann Frederick (1582–1628), failed to become an absolute ruler, and perforce recognised the checks on his power. During his reign, which ended in July 1628, Württemberg suffered severely from the Thirty Years' War although the duke himself took no part in it. His son and successor Eberhard III (1628–1674), however, plunged into it as an ally of France and Sweden as soon as he came of age in 1633, but after the battle of Nordlingen in 1634, Imperial troops occupied the duchy and the duke himself went into exile for some years. The Peace of Westphalia restored him, but to a depopulated and impoverished country, and he spent his remaining years in efforts to repair the disasters of the lengthy war. Württemberg was a central battlefield of the war. Its population fell by 57% between 1634 and 1655, primarily because of death and disease, declining birthrates, and the mass migration of terrified peasants.