Denis originated from the Zala branch of the extended gens (clan) Péc, which had large-scale possessions in several counties of Transdanubia, in addition to other parts of the Kingdom of Hungary.
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.
[1] 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,[11] when he resided in Graz, the seat of the Styrian province, along with his lord.
[14] Following a brief internal conflict, Béla IV and his son divided the country and Stephen received the lands to the east of the Danube, in accordance with the Peace of Pressburg, which was concluded around 25 November and confirmed on 5 December 1262.
[15] Becoming one of the most important partisans of the rex iunior, Denis served as palatine of the ducal court and ispán of Bács County at least since 3 May 1263,[16] but it is plausible that he already held both dignities since December 1262.
Around the same time, the king and his loyal advisers began to secretly contact with the most influential courtiers of Stephen, in order to persuade and bribe them to left the duke's allegiance.
[20] Historian Tamás Kádár argues Denis' relationship with the rex iunior had deteriorated and he lost power influence by then, as he did not become a member of the royal council in Béla's court thereafter: thus his change-over was a necessary, compulsive step.
Becoming a member of Duke Béla's court in Slavonia, Denis Péc was first mentioned as ispán of Syrmia County in March 1266,[22] but it is presumable that he was already appointed into that office right after his defection.
[28] Denis Péc was one of the commanders of the royal army against the Bohemian king Ottokar II, alongside Panyit Miskolc, Gregory Monoszló and Ernye Ákos,[29] which devastated the southeastern part of Styria and besieged Radkersburg, Fürstenfeld, Limbuh and Trasach, before returning home within days.
When Stephen V personally launched a plundering raid in Austria around 21 December, Denis possibly also took part in the clashes, as his relative Nicholas was present under his banner.
[27] Ban Joachim Gutkeled kidnapped Stephen's ten-year-old son and heir, Ladislaus and imprisoned him in the castle of Koprivnica in the summer of 1272, which marked the beginning of the era of feudal anarchy.
According to historian Jenő Szűcs, the elderly honored barons, who were made palatines and other chief officials, such Denis Péc, Ernye Ákos, Roland Rátót and Lawrence, son of Kemény were considered stable points and "beauty spot" in the fast-changing governments during the first five regnal years of Ladislaus.
But instead, he further based his military reputation; as ispán of Oklics (present-day Konšćica-Okić, Croatia), he participated in private initiative Hungarian incursions into Austria and Moravia in February 1273, along with Matthew Csák, Ivan Kőszegi, Joachim and Amadeus Gutkeled.
Alongside Joachim Gutkeled and Egidius Monoszló, who returned to Hungary from exile, he defeated a Moravian army at the walls of Detrekő Castle (today ruins near Plavecké Podhradie, Slovakia) in October.
[34] Following the repulse of the Bohemian invasion, the Kőszegis and their allies expelled several members of the royal council and established a homogeneous "party government" in late 1273, as Szűcs called in his monograph.
In order to remove self-declared Queen regent Elizabeth the Cuman from the power, the barons introduced reforms in the judicial sphere since the spring of 1273: at first, in Slavonia, where Henry Kőszegi served as ban, and following this in Hungary, when they occupied the important positions exclusively.
According to his charter, he convoked an assembly in Zala County and condemned two "malefactors" and confiscated their lands in absentia "on the command of the king and advice of the barons of the realm".
They demanded Slavonia in Duke Andrew's name, but Peter Csák defeated their united forces in the Battle of Föveny at the end of September, where Henry Kőszegi was killed.
[40] Shortly thereafter the ruling Csák group reorganized the government: Denis lost his office of palatine and succeeded the late Kőszegi as Ban of Slavonia.
He functioned as ispán of Zala County again since April 1275, while he was also made Master of the treasury in the court of Queen Elizabeth of Sicily in June, holding both positions until the second half of 1275.
[45] Denis Péc was present, when Ladislaus IV met Rudolf I of Germany in Hainburg an der Donau on 11 November to confirm their alliance against Ottokar II of Bohemia.