According to the terms set at the First Congress of Vienna in 1515, Ferdinand married Anne Jagiellonica, daughter of King Vladislaus II of Bohemia and Hungary on 22 July 1515.
Both Hungary and Bohemia were elective monarchies, where the parliaments had the sovereign right to decide about the person of the king.
Therefore, after the death of his brother-in-law Louis II, King of Bohemia and of Hungary, at the battle of Mohács on 29 August 1526, Ferdinand immediately applied to the parliaments of Hungary and Bohemia to participate as a candidate in the king elections.
On 24 October 1526 the Bohemian Diet, acting under the influence of chancellor Adam of Hradce, elected Ferdinand King of Bohemia under conditions of confirming traditional privileges of the estates and also moving the Habsburg court to Prague.
The success was only partial, as the Diet refused to recognise Ferdinand as hereditary lord of the Kingdom.

The throne of Hungary became the subject of a dynastic dispute between Ferdinand and John Zápolya, Voivode of Transylvania.
They were supported by different factions of the nobility in the Hungarian kingdom.
Ferdinand also had the support of his brother, the Emperor Charles V.
On 10 November 1526, John Zápolya was proclaimed king by a Diet at Székesfehérvár, John Zápolya was elected in the parliament by the untitled lesser nobility (gentry).

Nicolaus Olahus, secretary of Louis, attached himself to the party of Ferdinand but retained his position with his sister, Queen Dowager Mary.
Ferdinand was also elected King of Hungary, Dalmatia, Croatia, Slavonia etc.
by the higher aristocracy (the magnates or barons) and the Hungarian Catholic clergy in a rump Diet in Pozsony on 17 December 1526.
Accordingly, Ferdinand was crowned as King of Hungary in the Székesfehérvár Basilica on 3 November, 1527.

The Croatian nobles unanimously accepted the Pozsony election of Ferdinand I, receiving him as their king in the 1527 election in Cetin, and confirming the succession to him and his heirs.
In return for the throne, Archduke Ferdinand promised to respect the historic rights, freedoms, laws and customs of the Croats when they united with the Hungarian kingdom and to defend Croatia from Ottoman invasion.

The Austrian lands were in miserable economic and financial conditions, thus Ferdinand desperately introduced the so-called Turkish Tax (Türken Steuer).
In spite of the huge Austrian sacrifices, he was not able to collect enough money to pay for the expenses of the defence costs of Austrian lands.
His annual revenues only allowed him to hire 5,000 mercenaries for two months, thus Ferdinand asked for help from his brother, Emperor Charles V, and started to borrow money from rich bankers like the Fugger family.

Ferdinand defeated Zápolya at the Battle of Tarcal in September 1527 and again in the Battle of Szina in March 1528.
Zápolya fled the country and applied to Sultan Suleiman the Magnificent for support, making Hungary an Ottoman vassal state.

This led to the most dangerous moment of Ferdinand's career, in 1529, when Suleiman took advantage of this Hungarian support for a massive but ultimately unsuccessful assault on Ferdinand's capital: the Siege of Vienna, which sent Ferdinand to refuge in Bohemia.
A further Ottoman invasion was repelled in 1532 (see Siege of Güns).
In that year Ferdinand made peace with the Ottomans, splitting Hungary into a Habsburg sector in the west and John Zápolya's domain in the east, the latter effectively a vassal state of the Ottoman Empire.

Together with the formation of the Schmalkaldic League in 1531, this struggle with the Ottomans caused Ferdinand to grant the Nuremberg Religious Peace.
As long as he hoped for a favorable response from his humiliating overtures to Suleiman, Ferdinand was not inclined to grant the peace which the Protestants demanded at the Diet of Regensburg which met in April 1532.
But as the army of Suleiman drew nearer he yielded and on July 23, 1532 the peace was concluded at Nuremberg where the final deliberations took place.
Those who had up to this time joined the Reform
According to the terms set at the First Congress of Vienna in 1515, Ferdinand married Anne Jagiellonica, daughter of King Vladislaus II of Bohemia and Hungary on 22 July 1515. Both Hungary and Bohemia were elective monarchies, where the parliaments had the sovereign right to decide about the person of the king. Therefore, after the death of his brother-in-law Louis II, King of Bohemia and of Hungary, at the battle of Mohács on 29 August 1526, Ferdinand immediately applied to the parliaments of Hungary and Bohemia to participate as a candidate in the king elections. On 24 October 1526 the Bohemian Diet, acting under the influence of chancellor Adam of Hradce, elected Ferdinand King of Bohemia under conditions of confirming traditional privileges of the estates and also moving the Habsburg court to Prague. The success was only partial, as the Diet refused to recognise Ferdinand as hereditary lord of the Kingdom.
The throne of Hungary became the subject of a dynastic dispute between Ferdinand and John Zápolya, Voivode of Transylvania. They were supported by different factions of the nobility in the Hungarian kingdom. Ferdinand also had the support of his brother, the Emperor Charles V.
On 10 November 1526, John Zápolya was proclaimed king by a Diet at Székesfehérvár, John Zápolya was elected in the parliament by the untitled lesser nobility (gentry).
Nicolaus Olahus, secretary of Louis, attached himself to the party of Ferdinand but retained his position with his sister, Queen Dowager Mary. Ferdinand was also elected King of Hungary, Dalmatia, Croatia, Slavonia etc. by the higher aristocracy (the magnates or barons) and the Hungarian Catholic clergy in a rump Diet in Pozsony on 17 December 1526. Accordingly, Ferdinand was crowned as King of Hungary in the Székesfehérvár Basilica on 3 November, 1527.
The Croatian nobles unanimously accepted the Pozsony election of Ferdinand I, receiving him as their king in the 1527 election in Cetin, and confirming the succession to him and his heirs. In return for the throne, Archduke Ferdinand promised to respect the historic rights, freedoms, laws and customs of the Croats when they united with the Hungarian kingdom and to defend Croatia from Ottoman invasion.
The Austrian lands were in miserable economic and financial conditions, thus Ferdinand desperately introduced the so-called Turkish Tax (Türken Steuer). In spite of the huge Austrian sacrifices, he was not able to collect enough money to pay for the expenses of the defence costs of Austrian lands. His annual revenues only allowed him to hire 5,000 mercenaries for two months, thus Ferdinand asked for help from his brother, Emperor Charles V, and started to borrow money from rich bankers like the Fugger family.
Ferdinand defeated Zápolya at the Battle of Tarcal in September 1527 and again in the Battle of Szina in March 1528. Zápolya fled the country and applied to Sultan Suleiman the Magnificent for support, making Hungary an Ottoman vassal state.
This led to the most dangerous moment of Ferdinand's career, in 1529, when Suleiman took advantage of this Hungarian support for a massive but ultimately unsuccessful assault on Ferdinand's capital: the Siege of Vienna, which sent Ferdinand to refuge in Bohemia. A further Ottoman invasion was repelled in 1532 (see Siege of Güns). In that year Ferdinand made peace with the Ottomans, splitting Hungary into a Habsburg sector in the west and John Zápolya's domain in the east, the latter effectively a vassal state of the Ottoman Empire.
Together with the formation of the Schmalkaldic League in 1531, this struggle with the Ottomans caused Ferdinand to grant the Nuremberg Religious Peace. As long as he hoped for a favorable response from his humiliating overtures to Suleiman, Ferdinand was not inclined to grant the peace which the Protestants demanded at the Diet of Regensburg which met in April 1532. But as the army of Suleiman drew nearer he yielded and on July 23, 1532 the peace was concluded at Nuremberg where the final deliberations took place. Those who had up to this time joined the Reform
Ferdinand I, Holy Roman Emperor