The Hungarian king Matthias Corvinus was a long-term enemy of Frederick III who also invaded Austria and occupied parts of Lower Austria. After the death of Corvinus, who had no children, the Bohemian king Vladislav from the House of Jagiellonian was elected his successor. Thereby, he won out against the Habsburg Maximilian. In 1491, Vladislav and Maximilian signed a peace treaty in which Maximilian acknowledges Vladislav’s reign and at the same time secured the hereditary right in Hungary in the event that Vladislav dies heirless.