Styria had been annexed in 1254, but the local lords rose up in rebellion and expelled Béla IV's governor, Stephen Gutkeled, before Duke Stephen's appointment, who also received two neighboring countiesVas and Zalain Hungary from his father. Denis was one of those young lords with illustrious Transdanubian noble origin, who remained without office due to the influence of older generations in the royal court of Béla IV, as a result, they supported the duke's efforts. Denis participated in that military campaign, when Duke Stephen and his father jointly invaded Styria and subdued the rebels. Denis was styled as Master of the stewards in the ducal court, ispán of Zala County and captain of Pettau (present-day Ptuj in Slovenia) on 26 May 1259, when he resided in Graz, the seat of the Styrian province, along with his lord. In that capacity, he was subordinated to Stephen Gutkeled, who governed the occupied province from Pettau Castle. However, with support from King Ottokar II of Bohemia, the local lords again rebelled. By January 1260, Duke Stephen could preserve only Pettau and its region, where Denis served as captain. He participated in the subsequent skirmishes, but the entire province were lost for the Hungarians after the Battle of Kressenbrunn in July 1260. Thereafter Stephen left Styria and returned to Transylvania. Around the same time, Denis was replaced as ispán of Zala County by Csák Hahót.
