Through the marriages of four children and a slice of good luck the Habsburgs acquired Bohemia and Hungary – the latter bringing them a conflict with the Ottoman Empire that would last for centuries.
As if Burgundy and Spain were not enough, Maximilian I also wanted to bring Bohemia and Hungary under Habsburg rule. After Matthias Corvinus had died in 1490 and the Hungarians had been expelled from Austria, Maximilian concluded a treaty with the new ruler of Bohemia and Hungary, the Jagiellon king Ladislas II, the ultimate aim of which was to secure the Hungarian crown – the crown of St Stephen – for the Habsburgs. In order to consolidate their alliance and joining of forces against the rebellious Estates of Hungary, Maximilian concluded a contract for a future double wedding with the house of Jagiellon. Louis, son of Ladislas II, was to become Maximilian’s adoptive son and marry his granddaughter Mary, while Louis’s sister Anna was to marry one of Maximilian’s grandsons, either Ferdinand or Charles. One problem with this plan was that Charles was already spoken for, and Ferdinand was intended to become heir to the throne of Spain.
In 1515, during a diet of the princes of the Empire, the magnificent double wedding took place at St Stephen’s Cathedral in Vienna. Louis and Mary, both only nine years old, exchanged rings; and the twelve-year-old Anna was married to the fifty-six-year-old Emperor Maximilian on the condition that within one year the union could be transferred to one of his two grandsons, which indeed happened, as Charles came to the throne in Spain, leaving Ferdinand free for the Hungarian marriage.
In spite of the double wedding in Vienna, it was of course still not absolutely sure that the Habsburgs would in fact accede to the inheritance of Bohemia and Hungary. Not until eleven years later in 1526 was this made possible by the death of King Louis of Bohemia and Hungary after the Battle of Mohács, upon which both lands fell to the Habsburgs – but only in theory, as it was a prospect with which the Estates of Hungary were highly dissatisfied. Fearing for their chartered rights, they elected the Hungarian nobleman John Zápolya as king in opposition to the Habsburg Ferdinand I, ushering in a civil war between the two parties. Now that the Habsburgs and Ottomans were direct neighbours, conflicts between them followed that were to last for many generations. For one and a half centuries Hungary was split into three parts – only at the end of the seventeenth century, after almost two hundred years of war against the Turks, did the Habsburgs actually bring the whole of Hungary under their control.