In 1428, while the Ottoman Empire was fighting a war with the Republic of Venice, the Ottomans and the Kingdom of Hungary achieved a temporary peace by establishing the Serbian Despotate as a buffer state. After the war ended in 1430, the Ottomans returned to their earlier policy of controlling all lands south of the Danube. In 1432, Sultan Murad II began raiding into Transylvania. After King Sigismund died in 1437, the attacks intensified, with the Ottomans occupying Borač in 1438 and Zvornik and Srebrenica in 1439. At the end of 1439, Smederevo capitulated and Murad succeeded in making Serbia an Ottoman province. Đurađ Branković, Despot of Serbia, fled to his estates in Hungary. In 1440, Murad besieged Hungary's main border fortress, Belgrade. After failing to take the fortress, he was forced to return to Anatolia to stop attacks by the Karamanids.
Meanwhile, Sigismund's successor Albert had died in October 1439, shortly after signing a law to "restore the ancient laws and customs of the realm". The law restricted the royal authority by requiring the participation of landed nobility in political decisions. Four months after Albert's death, his only son, Ladislaus, was born while Hungary was in the midst of a civil war over the next monarch. On 17 July 1440 Vladislaus, king of Poland, was crowned despite continuing disputes. John Hunyadi aided Vladislaus's cause by pacifying the eastern counties, gaining him the position of Nádor of Transylvania and the corresponding responsibility of protecting Hungary's southern border. By the end of 1442, Vladislaus had secured his status in Hungary, and denied an Ottoman proposal of peace in exchange for Belgrade.
The Roman Catholic Church, meanwhile, had long been advocating for a crusade against the Ottomans, and with the end of both the Hungarian civil war and a nearly simultaneous one in Byzantium, they were able to realistically begin negotiations and planning. The impetus required to turn the plans into action was provided by Hunyadi between 1441–42. In 1441, he defeated a raid led by Ishak Pasha of Smederevo. He nearly annihilated Mezid Bey's army in Transylvania on 22 March 1442, and in September he defeated the revenge attack of Şihabeddin Pasha, governor-general of Rumelia. Branković, hoping to liberate Serbia, also lent his support after Novo Brdo, the last major Serbian city, fell to the Ottomans in 1441.
On 1 January 1443 Pope Eugene IV published a crusading bull. In early May, it was reported "that the Turks were in a bad state and that it would be easy to expel them from Europe", War was proclaimed against Sultan Murad II. at the diet of Buda on Palm Sunday 1443, and with an army of 40,000 men, mostly Magyars, the young monarch, with Hunyadi commanding under him, crossed the Danube, took Nish and Sofia.
The crusaders, led by Vladislaus, Hunyadi, and Branković, attacked in mid-October. They correctly expected that Murad would not be able to quickly mobilize his army, which consisted mainly of fief-holding cavalrymen who needed to collect the harvest to pay taxes. Hunyadi's experience of winter campaigns from 1441–42 added to the Hungarian's advantage. They also had better armor, often rendering the Ottoman weapons useless. Murad could not rely on the loyalty of his troops from Rumelia, and had difficulties countering Hungarian tactics.
In the Battle of Nish the crusaders were victorious and forced Kasim Pasha of Rumelia and his co-commander Turahan Bey to flee to Sofia, Bulgaria to warn Murad of the invasion. However, the two burned all the villages in their path in an attempt to wear down the crusaders with a scorched earth tactic. When they arrived in Sofia, they advised the Sultan to burn the city and retreat to the mountain passes beyond, where the Ottoman's smaller army would not be such a disadvantage.
Shortly after, bitter cold set in, and the next encounter, fought at Zlatitsa Pass on 12 December 1443, was fought in the snow. Until the Battle of Zlatitsa the crusaders did not meet major Ottoman army but town garrisons along their route toward Adrianople. Only at Zlatica they met strong and well positioned defence forces of the Ottoman army. The crusaders were defeated. As they marched home, however, they ambushed and defeated a pursuing force in the Battle of Kunovica, where Mahmud Bey, son-in-law of the Sultan and brother of the Grand Vizier Çandarlı Halil Pasha, was taken prisoner. Four days after this battle Christian coalition reached Prokuplje. Đurađ Branković proposed to Władysław III of Poland and John Hunyadi to stay in Serbian fortified towns during the winter and continue their campaign against Ottomans in Spring 1444. They rejected his proposal and retreated. By the end of January 1444 forces of Władysław and Hunyadi reached Belgrade and in February they arrived to Buda where they were greeted as heroes.
While the battle at Zlatitsa Pass had been a defeat, the ambush returned to the crusaders the impression of an overall Christian victory, and they returned triumphant. The King and Church were both anxious to maintain the impression and gave instructions to spread word of the victories, but contradict anyone who mentioned the loss.
Murad, meanwhile, returned angry and dejected by the unreliability of his forces, and imprisoned Turahan after blaming him for the army's setbacks and Mahmud Bey's capture.
Murad is believed to have had the greatest wish for peace. Among other things, his sister begged him to obtain her husband Mahmud's release, and his wife Mara, daughter of Đurađ Branković, added additional pressure. On 6 March 1444 Mara sent an envoy to Branković; their discussion started the peace negotiations with the Ottoman Empire.
On 24 April 1444 Vladislaus sent a letter to Murad, stating that his ambassador, Stojka Gisdanić, was travelling to Edirne with full powers to negotiate on his behalf. He asked that, once an agreement was reached, Murad sent his own ambassadors with the treaty and his sworn oath to Hungary, at which point Vladislaus could also swear.
That same day, Vladislaus held a Diet at Buda, where he swore before Cardinal Julian Cesarini to lead a new expedition against the Ottomans in the summer. The strongest remaining supporter of Ladislaus' claim for the throne also agreed to a truce, thus removing the danger of another civil war.
Between June and August 1444, negotiations for a treaty were carried out, first in Edirne, and then in Szeged. The crusaders were not entirely interested in peace, however, especially with Cesarini pushing for the crusade's continuation. The Cardinal eventually found a solution that would allow for both the continuation of fighting and the ratification of the treaty, and on 15 August 1444 the Peace of Szeged was sworn into effect.
Shortly after all the short-term requirements of the treaty were fulfilled, the Hungarians and their allies resumed the crusade. Murad, who had retired shortly after the treaty was completed, was called back to lead the Ottoman army. On 10 November 1444 the two armies clashed at the Battle of Varna (near the Black Sea fortress of Varna, Bulgaria). The Ottomans won a decisive victory despite heavy losses, while the crusaders lost their King and over 15,000 men. Đurađ Branković contributed to Ottoman victory by giving the Sultan information on the Christian advance and barring the way Skanderbeg intended to cross Serbia to join the Christian forces at Varna.
Many were crippled by frostbite, many more died in smaller follow-up battles, and most European prisoners were killed or sold into slavery. Hungary fell back into civil war until Hunyadi was elected Regent for the infant Ladislaus in June 1446. Branković retained control over Serbia.
The Ottoman victory in Varna, followed by the Ottoman victory in the Second Battle of Kosovo in 1448, deterred the European states from sending a substantial military assistance to the Byzantines during the Ottoman conquest of Constantinople (Istanbul) in 1453. And although Pius II officially declared a 3-year crusade at the Council of Mantua to recapture Constantinople from the Ottomans, the leaders who promised 80,000 soldiers to it reneged on their commitment. The Ottoman Empire was free, for several decades, from any further serious attempts to push it out of Europe.