During the absence of King Casimir IV Jagiellon he was deputized in several state matters including dealing with the Old Prussians; however, by the end of Casimirs reign their relationship had soured, probably due to a rivalry with Frederick Jagiellon, the Bishop of Kraków and Casimir's son. After the death of Casimir, he was a strong supporter for the election of Janusz III of Masovia to be the new king as opposed to John I Albert.