For five years of his reign, the city served as the capital of Hungary. After the death of Matthias Corvinus, the city was recaptured by the Habsburgs.