Vladislaus, still in his teens, waited for his father’s representatives to reach an agreement with Matthias’s representatives. Finally, on February 21, 1474, a treaty was signed. Two days after this landmark occasion, Vladislaus himself signed a treaty that was intended to last for three years.
Not long afterwards, Vladislaus attended the Imperial Diet at Nuremberg, where he met Emperor Frederick III. Vladislaus and his father persuaded the emperor to form a coalition to fight Matthias, and in October of 1474 – in violation of the three-year peace treaty – Czech and Polish troops invaded Silesia and trapped Matthias in Wrocław. The Hungarians were more than up to the fight; they simply cut off the invaders’ supply routes, and Casimir and Vladislaus had to sign another peace treaty on December 8, this one good for one year.
In 1476 – the year he turned 20 years old – Vladislaus seized the Duchy of Głogów (in Silesia) by the simple expedient of marrying Barbara of Brandenburg, who had inherited it from her late husband, Henry XI of Głogów. Vladislaus was intent on expanding his influence in Silesia, and Głogów had traditionally recognized Matthias’s suzerainty. The two were married sight unseen; Vladislaus married Barbara by proxy. Once again, Matthias gained the upper hand. He supported the successful efforts of Jan II, Duke of Żagań (nephew of Henry IX) to occupy the duchy.
On December 5, 1476, Vladislaus and Emperor Frederick III confirmed their opposition to Matthias. The papal legate (who had a busy time of it with Vladislaus and his confederates) warned the young king that if he invaded Matthias’s territory, he (Vladislaus) would be excommunicated.
On June 10, 1477, Frederick III formally named Vladislaus King of Bohemia and Prince-elector of the Holy Roman Empire. An enraged Matthias declared war against the emperor two days later, invading Austria. Vladislaus sent troops to Austria to support Frederick, but was forced to recall them before the end of the month. Matthias had won again; Frederick had to recognize him as the rightful king of Bohemia on December 1, 1477.
True to his word, Baldasare de Piscia (the papal legate) excommunicated Vladislaus and his followers on January 15, 1478. Negotiations between the two claimants started again, this time reaching an odd compromise. Both men were allowed to use the title of King of Bohemia. Vladislaus was allowed to rule Bohemia, while Matthias was given Moravia, Lusatia, and Silesia. Upon Matthias’s death, Vladislaus would be allowed to regain his old enemy’s territory for 400,000 gold florins. This treaty was celebrated at a personal meeting between the two kings in Olomouc on July 21, 1479.
Now that peace had finally been achieved, Matthias’s Czech Catholic supporters were able to return home. Vladislaus, himself a Catholic, made the decision to give the Catholics in his now much-smaller country a more solid standing, as he wished to gain more power in Europe, supported by the Holy See. He began putting Catholics in offices formerly held by Hussites; furthermore, two of the sons of George of Poděbrady, that staunch Hussite, converted to Catholicism. The Hussites were not happy, and they made their frustration known in a fatal manner.