Matthias Corvinus died unexpectedly in Vienna on 6 April 1490.
By the time the noblemen assembled to elect his successor in May, four candidates laid claim to the throne.
John Corvinus was primarily supported by barons and prelates who owned estates along the southern frontier (including Lawrence Újlaki and Peter Váradi, Archbishop of Kalocsa).
Maximilian of Habsburg referred to the 1463 Peace Treaty of Wiener Neustadt, which prescribed that Emperor Frederick or his heirs were to inherit Hungary if Matthias died without a legitimate heir.
Vladislaus claimed Hungary as the eldest son of the sister of Matthias's predecessor, Ladislaus the Posthumous.
However, his parents, who wanted to secure a separate realm to their each sons, proposed Vladislaus's younger brother, John Albert.

Most Hungarian barons and prelates preferred Vladislaus, because his rule in Bohemia had indicated that he would respect their liberties.
Vladislaus also pledged that he would marry Matthias's wealthy widow, Beatrice of Naples, after his coronation.
His two supporters, Stephen Báthory and Paul Kinizsi, defeated John Corvinus on 4 July.
The Diet of Hungary elected Vladislaus king on 15 July.
Vladislaus who had left Prague for Hungary in late June issued a charter promising to refrain from imposing extraordinary taxes or introducing other "harmful novelties" and to closely cooperate with the Royal Council.
He reached Buda (the capital of Hungary) on 9 August.
He met his brother, who had marched as far as Pest on the opposite side of the Danube River, but they did not reach a compromise.

Vladislaus was crowned king on 18 September in Székesfehérvár.
In accordance with the promise he made after his election, he settled in Buda.
In his absence, Bohemia was administered by the great officers of state, especially the Burgrave of Prague and the Chancellor.
Moravia, Silesia and Lusatia had acknowledged his rule soon after Matthias Corvinus's death.
Although Vladislaus pledged that the three provinces would be attached to the Hungarian Crown until the money stipulated in the Peace of Olomouc was paid to the Hungarian treasury, the Estates of the Bohemian Crown argued that the personal union under his rule made that stipulation void.
The 400,000 gold florins were never paid.

John Albert did not renounce Hungary after Vladislaus's coronation.
He captured Eger and laid siege to Kassa (Košice in Slovakia) in September.
Vladislaus married Beatrice of Naples in Esztergom on 4 October, but the marriage was kept secret, although she gave considerable funds to him to finance his campaigns for Hungary.
Maximilian of Habsburg also invaded Hungary and seized Szombathely, Veszprém and Székesfehérvár by the end of November.
Vladislaus's supporters relieved Kassa in early December, and Maximilian withdrew from Hungary before the end of the year, because he could not finance his campaign.
John Albert renounced his claim to Hungary in exchange for the Duchy of Głogów and the suzerainty over half of Silesia on 20 February 1491.
John Albert again broke into Hungary in autumn, but Stephen Zápolya forced him to withdraw.

Vladislaus's troops had meanwhile expelled the army of Maximilian of Habsburg from Hungary.
In the Peace of Pressburg, signed on 7 November, Vladislaus renounced all territories that Matthias Corvinus had conquered in Austria and also acknowledged the Habsburgs' right to inherit Hungary and Bohemia if he died without a son.
Stephen Zápolya routed John Albert at Eperjes (Prešov in Slovakia) on 24 December, forcing him to abandon his claim to Hungary.
Matthias Corvinus died unexpectedly in Vienna on 6 April 1490. By the time the noblemen assembled to elect his successor in May, four candidates laid claim to the throne. John Corvinus was primarily supported by barons and prelates who owned estates along the southern frontier (including Lawrence Újlaki and Peter Váradi, Archbishop of Kalocsa). Maximilian of Habsburg referred to the 1463 Peace Treaty of Wiener Neustadt, which prescribed that Emperor Frederick or his heirs were to inherit Hungary if Matthias died without a legitimate heir. Vladislaus claimed Hungary as the eldest son of the sister of Matthias's predecessor, Ladislaus the Posthumous. However, his parents, who wanted to secure a separate realm to their each sons, proposed Vladislaus's younger brother, John Albert.
Most Hungarian barons and prelates preferred Vladislaus, because his rule in Bohemia had indicated that he would respect their liberties. Vladislaus also pledged that he would marry Matthias's wealthy widow, Beatrice of Naples, after his coronation. His two supporters, Stephen Báthory and Paul Kinizsi, defeated John Corvinus on 4 July. The Diet of Hungary elected Vladislaus king on 15 July. Vladislaus who had left Prague for Hungary in late June issued a charter promising to refrain from imposing extraordinary taxes or introducing other "harmful novelties" and to closely cooperate with the Royal Council. He reached Buda (the capital of Hungary) on 9 August. He met his brother, who had marched as far as Pest on the opposite side of the Danube River, but they did not reach a compromise.
Vladislaus was crowned king on 18 September in Székesfehérvár. In accordance with the promise he made after his election, he settled in Buda. In his absence, Bohemia was administered by the great officers of state, especially the Burgrave of Prague and the Chancellor. Moravia, Silesia and Lusatia had acknowledged his rule soon after Matthias Corvinus's death. Although Vladislaus pledged that the three provinces would be attached to the Hungarian Crown until the money stipulated in the Peace of Olomouc was paid to the Hungarian treasury, the Estates of the Bohemian Crown argued that the personal union under his rule made that stipulation void. The 400,000 gold florins were never paid.
John Albert did not renounce Hungary after Vladislaus's coronation. He captured Eger and laid siege to Kassa (Košice in Slovakia) in September. Vladislaus married Beatrice of Naples in Esztergom on 4 October, but the marriage was kept secret, although she gave considerable funds to him to finance his campaigns for Hungary. Maximilian of Habsburg also invaded Hungary and seized Szombathely, Veszprém and Székesfehérvár by the end of November. Vladislaus's supporters relieved Kassa in early December, and Maximilian withdrew from Hungary before the end of the year, because he could not finance his campaign. John Albert renounced his claim to Hungary in exchange for the Duchy of Głogów and the suzerainty over half of Silesia on 20 February 1491. John Albert again broke into Hungary in autumn, but Stephen Zápolya forced him to withdraw.
Vladislaus's troops had meanwhile expelled the army of Maximilian of Habsburg from Hungary. In the Peace of Pressburg, signed on 7 November, Vladislaus renounced all territories that Matthias Corvinus had conquered in Austria and also acknowledged the Habsburgs' right to inherit Hungary and Bohemia if he died without a son. Stephen Zápolya routed John Albert at Eperjes (Prešov in Slovakia) on 24 December, forcing him to abandon his claim to Hungary.
Vladislaus II of Hungary