Briefly in the service of the Teutonic Order, he soon renounced it, and in 1410 he took part in the Battle of Grunwald on the Polish side. After the battle he and his close friend Stibor of Stiboricz proposed a peace treaty between the King Jagiełło of Poland and Sigismund of Luxembourg, then King of Hungary, which came to be known as the Treaty of Lubowla. In 1412 he participated in the conference between Sigismund, Wladyslaw II and Tvrtko II of Bosnia at Buda, where he won the tournament held there, with 1,500 knights present.