Poland amassed an army of 12,000 men, commanded by Piotr Dunin and Dziersław of Rytwiany. Both King Casimir and Prince Casimir participated in the campaign. In October 1471, the Polish army crossed the Hungarian border and slowly marched towards Buda. Matthias Corvinus managed to win over the majority of the Hungarian nobles, including the main conspirator Archbishop János Vitéz, and the Polish army did not receive the expected reinforcements. Only Deák, Perény and Rozgonyi families sent troops. Upon hearing that Corvinus' army of 16,000 men camped outside of Pest, the Polish army decided to retreat from Hatvan to Nitra. There the soldiers battled food shortages, spreading infectious diseases, and the upcoming winter. The Polish King also lacked funds to pay the mercenaries. As a result, the Polish army decreased by about a third. In December 1471, Prince Casimir, fearing for his safety, was sent to Jihlava closer to the Polish border and that further eroded their soldiers' morale. Corvinus took Nitra and a one-year truce was completed in March 1472 in Buda. Prince Casimir returned to Kraków to resume his studies with Długosz.