As the "key to the realm", the castle of Nándorfehérvár (now Belgrade, Serbia) was the largest and most fortified border stronghold of Hungary, regarded as the southern gate of the Hungarian Kingdom. In 1440, the Ottomans under Sultan Murad II laid siege to Belgrade, the most important Hungarian border fortress in the south, but they had to lift the siege after seven months due to the stiff resistance of the Hungarian garrison and the approaching winter season. This situation, combined with an ongoing civil war over the Hungarian royal succession, suggests that an Ottoman victory in 1440 could very likely have led to the collapse of the kingdom shortly thereafter. Despite this, many Hungarian nobles remained more concerned with the outcome of the internal conflict than with the threat posed by the Ottomans. Shortly after Władysław's accession the conflict with the supporters of Elizabeth deepened. The western and northern parts of the country remained on the side of the queen and opposing
magnates, chiefly the
Counts of Celje (Cilli), the
Garai family and
Dénes Szécsi, Archbishop of Esztergom. In turn, the eastern regions and
Transylvania upheld Władysław and his partisans, among them
John Hunyadi who became a leading political and military figure in Hungary. In order to assert her claim, Elizabeth had to maintain the wealthy mining counties in what now constitutes
Slovakia and hired Hussite
mercenaries from Bohemia commanded by
John Jiskra. Jiskra undertook a quick campaign and occupied much of the fortresses and defensive posts in northern Hungary, often with the support of local populations and devotees that held Jiskra in high regard because of his fight for religious freedoms. As a benefactor to the mercenaries, Elizabeth had to pawn the Holy Crown and transfer tutelage over her newborn son to Frederick III. However, this proved insufficient to fund the war against Władysław; she was then forced to handover her privately owned Austrian estates and the Hungarian
County of
Sopron to the Habsburgs in late 1440 and early 1441. This conduct alienated many of the lords that initially supported Elizabeth's cause, including
Nicholas of Ilok,
Ban of Croatia, who switched sides and allied himself with Władysław and John Hunyadi. The western territories as well as some 70 fortresses under
Ulrich II, Count of Celje in modern-day Austria, Croatia and
Slovenia remained stalwart and loyal to the queen. Before the end of 1440, Hunyadi attacked
Győr but was unable to take the garrisoned city. He was, however, successful in capturing local townships and villages around Buda and Székesfehérvár to prevent the escape of nobles and designated traitors. This proved paramount when Ulrich II made an attempt to flee to
Pressburg (Pozsony); he was caught by a Polish detachment and subsequently imprisoned at Władysław's behest. Concurrently,
Ladislaus Garai instigated a rebellion in the south. Hunyadi, together with Nicholas of Ilok, annihilated Garai's army at
Bátaszék on 10 September 1440. Their victory effectively put an end to the Hungarian civil war.In January 1441, Ulrich was released from captivity, pledged an oath of loyalty to Władysław and freed the hostages held by his troops. The grateful king jointly appointed Hunyadi and Újlaki as
Voivodes of Transylvania,
Counts of the Székelys,
Ispáns of
Temes County, and Captains of
Belgrade, entrusting them with the defense of the southern marches. In practice, Hunyadi led, while Újlaki mainly delegated authority and supplied troops when needed. Hunyadi brought a decisive change to the Hungarian government's approach to the Ottoman threat., 1440–1456The victorious
Hungarian campaigns against the Ottomans in 1442 (
Battle of the Iron Gate in March and
Battle of the Ialomița in early September) strengthened the position of Vladislaus I as king of Hungary. The Pope firmly aligned itself with him, seeking to restore Hungary's political unity in order to enable a renewed offensive against the Ottomans. Supporters of
Elizabeth of Luxembourg were increasingly seen as obstructing not only internal peace but also efforts against the Ottomans. Hunyadi emerged as the leading baron in the faction of Vladislaus and the military commander in whom people placed their hopes for a new campaign against the Ottomans. Using his rising fame and military-political influence, Hunyadi immediately began preparing a massive anti-Ottoman campaign, designed not for punitive plundering but for extensive military operations deep within Ottoman territory. == Aftermath ==