Matthias invaded with the pretext of returning Bohemia to Catholicism; at the time, it was ruled by the Hussite king, George of Poděbrady.
At the beginning of his reign, Matthias continued the policy of his father John Hunyadi in defending Hungary, the "bulwark of Christendom," against the Turks.
However, as Matthias led campaigns each year, he came to the realization that by the late 15th century it was no longer possible to oust the Ottoman Turks from Europe.
Rankling under the heavy costs of bordering the Sultan, and resenting his Christian neighbors, like Frederick III, who often meddled in Hungary when Matthias was on campaign, Matthias made the radical decision to come to an entente with the Turks, enabling the Hungarian king to turn westward.
The war would continue with George's successor Vladislaus II, until the latter signed the Treaty of Brno with Matthias in 1478, recognizing the Hungarian king's conquests.