Habsburg Austria devolved defense of the Militargrenze against the expanding Ottoman Empire to local nobles and clan lords, while Vienna was increasingly occupied with wars in southern Germany or Italy. During the 14th century Austrian knights were repeatedly bested in battle by Swiss infantry. At the start of the 15th century Austria was drawn into the Appenzell Wars (1403-1411) with the Swiss and the more important and protracted Hussite Wars (1419-1478) in Bohemia. Maximilian I (1459-1519) married Mary of Burgundy after her father, Charles the Rash, was killed at Nancy (1477) by the Swiss. This gained Burgundy, greatest of all French medieval feudatories, for the Austrian Habsburgs.
The rest of Europe looked on in envy as once again Austria used dynastic marriage to expand without making war (''Tu, felix Austria, nube'' or ''You, happy Austria, marry''). Another marriage produced a son who came into a spectacular inheritance: Charles V, who united Austrian and Spanish empires in his person. This preeminence did not go unchallenged: Austria was deeply involved in the Italian Wars (1494-1559) against France through the reign of Charles V, and fought off the Ottomans who besieged Vienna itself. From 1530, Charles was concerned with Martin Luther and the Protestant Reformation in Germany, culminating in war against his own subjects in the Schmalkaldic League. A truce was called in Germany with the Peace of Augsburg (1555). Charles abdicated and retired into melancholia and an early death in Spain.
By the mid-16th century Austria's rulers were too weak to reimpose Catholicism on those of their subjects who embraced Protestantism, although Ferdinand I tried hard to do so. From 1568 to 1571, Maximilian II instead legalized Protestant parishes in Lower Austria and even approved their reformed Prayer Book. That was prudent, since by the 1570s the majority of Upper and Lower Austria's nobility was Protestant. The rights of Protestants of the lower orders and in the towns were not as secure. The Imperial Court remained staunchly Catholic, moreover, while a Catholic revival was already underway in Inner Austria by the 1560s. Protestants there, notably the citizens of Graz and three other large towns, were granted toleration because of the Ottoman threat.
But these temporary freedoms were whittled away by Jesuit missionaries as the threat from Constantinople receded and the spirit and tactics of the Counter-Reformation seized the Catholic world. From 1599 to 1601, Catholic bishops in Graz and other towns, supported by Imperial and Austrian troops, suppressed reformed religion in Inner Austria. They closed reform churches, burned Lutheran and Calvinist books, and exiled or even burned Protestant clergy. The start of the 17th century saw Austria pulled reluctantly into the indecisive Thirteen Years' War (1593-1606) with the similarly reluctant Ottomans, and 10 years later into the Uzkok War (1615-1617) with Venice. A decisive turn of fortune, for the worse, came when Bohemia rejected the candidacy of then Archduke Ferdinand, later Ferdinand II, and carried through the ''Defenestration of Prague'' (1618). That launched Bohemia, Austria, and Europe into the Thirty Years' War (1618-1648). Austria emerged from that titanic contest a lesser power than before, but with more clearly defined boundaries and Catholicism more uniformly enforced and established.