By this time however, there were signs of substantial progress on the part of the great Catholic reaction, which was to have important consequences for Germany. This was due mainly to the persistent zeal of the Jesuits. For a long time the Protestants had absorbed the intellectual strength of the country, but now many able scholars and divines among the Jesuits could hold their own with their antagonists. These devoted missionaries of the church gave their attention mainly to the young, and during the reign of Rudolph II. they were fortunate enough to make a deep impression upon two princes, each of whom was destined to play a great part in the events of his time. These princes were Maximilian, duke of Bavaria, and Ferdinand, archduke of Styria, the former a member of the house of Wittelsbach, and the latter of the house of Habsburg. Maximilian became prominent in 1607 by executing an imperial mandate against the free city of Donauwörth, where a religious riot had taken place, and afterwards treating it as his own. Rendered suspicious by this arbitrary act, the Protestant princes in 1608 formed a confederation known as the Evangelical Union, and in response the Roman Catholics, under the guidance of Maximilian, united in a similar confederation afterwards called the Catholic League. This was founded at Munich in July 1609. As the Union was headed by the elector palatine of the Rhine, Frederick IV., who was a Calvinist, many Lutherans, among them the elector of Saxony, were by no means enthusiastic in its support. It acquired, however, immense importance through its alliance with Henry IV. of France, who, like Henry II., wished to profit by the quarrels in Germany, and who interfered in the disputed succession to the duchies of Cleves and Jülich. War seemed about to break out between the two confederations and their foreign allies over this question, but after the murder of the French king in May 1610 the Union did not venture to fight.
Ferdinand was even more vigorous than Maximilian in defence of his religion. On assuming the government of Styria he set to work to extirpate Protestantism, which had made considerable progress in the Austrian archduchies. Soon afterwards he was selected by the Habsburgs as the heir of the childless emperor Matthias, and on coming to Vienna after the death of that sovereign in March 1619 he found himself in the midst of hopeless confusion. The Bohemians refused to acknowledge him as their king and elected in his stead Frederick V., the elector palatine of the Rhine, a son-in-law of the English king James I., and the Hungarians and the Austrians were hardly less disaffected. As Ferdinand II., however, he succeeded in obtaining the imperial crown in August 1619, and from that time he was dominated by a fixed resolve to secure the triumph of his church throughout the Empire, a resolve which cost Germany the Thirty Years' War.