The Treaty of Edirne and the Peace of Szeged were two halves of a peace treaty between Sultan Murad II of the Ottoman Empire and King Vladislaus of the Kingdom of Hungary. Despot Đurađ Branković of the Serbian Despotate also had a large role in the proceedings. The ratification took place on August 15, 1444 in Várad, a few months before the end of the Crusade of Varna.
The treaty was started in Edirne with discussions between Murad and Vladislaus' ambassador. Within a few days, it was sent to Szeged with Murad's ambassador, to be finalized and ratified by Vladislaus. Once it arrived, complications caused the negotiations to continue for several more days, and oaths were eventually given in Várad.
The Crusade of Varna officially began on January 1, 1443, with a crusading bull published by Pope Eugene IV. The fighting did not start as planned, however. The Hungarian and Karamanid armies were supposed to attack the Ottoman Empire simultaneously, but in the spring of 1443, before the Hungarians were ready, the Karamanids attacked the Ottomans and were devastated by Sultan Murad II's full army.
The Hungarian army, led by King Vladislaus, John Hunyadi, and Serbian Despot Đurađ Branković, attacked in mid-October. They had several advantages over the Ottomans, allowing them to win the first encounters, such as forcing Kasim Pasha of Rumelia and his co-commander Turakhan Beg to abandon camp and flee to Sofia, Bulgaria to warn Murad of the invasion. However, the two burned all the villages in their path to wear down the Hungarians with scorched earth. 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 wouldn't be such a disadvantage. Shortly after, bitter cold set in.