and Savnik (present-day Vydrník and Spišský Štiavnik in Slovakia, respectively). Denis established the Cistercian abbey of Szepes (or Savnik) with the consent and support of Coloman in 1223. He invited Cistercian friars from Wąchock Abbey in the Kingdom of Poland in order to settle in the newly erected monastery. Sometime later, the monastery was put under direct royal patronage. Palatine of Hungary Denis was replaced as Master of the treasury by Denis Tomaj for unknown reasons in 1224. He was appointed Palatine of Hungary (), the most prestigious secular dignity in the kingdom, by Andrew II in 1227. Denis was the only known palatine during the reign of Andrew II, who did not hold any ispánate beside his dignity. During his first term as palatine, Denis entered into a conflict of jurisdiction with the church in many cases. According to Archbishop Robert of Esztergom, when listed his "sins" years later (in 1232, see below), Denis not only deprived many clerics of their revenues and office, but he had also beaten and treated them with disgrace; made several forms of domination on the provost and parish priest of Szepes; and even slapped John, the provost of Pressburg (today Bratislava, Slovakia) in his face. Because of his anti-church violations, even Uros, the abbot of Pannonhalma did not take his legal affairs to the palatinal court, despite his earlier and later habits in this context. Similarly to his contemporaries, Denis had no permanent palatinal court. During his first term (1227–1228), he judged over lawsuits throughout the kingdom, for instance in Somogy, Nógrád, Baranya (beyond the Drava) and Požega counties according to the surviving documents. Andrew II sent Denis on a diplomatic mission to the Bulgarian Empire in 1227, visiting the court of Tsar Ivan Asen II, Andrew's son-in-law. Denis' seal was preserved by an undated charter which is currently kept in the Heiligenkreuz Abbey. It depicts two opposing ascending dragons in a blazon with the circumscription "Sigillum Dionysii palatini". By 1228, Duke Béla's supporters took power in the royal council after another wave of dissatisfaction. Andrew was forced to authorize his son to revise his previous land grants throughout Hungary. As Palatine, Denis directed the restitution of the Pecheneg lands; he fulfilled his compulsory official duty by "taking back, by the order of the king, all the alienated Pecheneg lands". Historian Attila Zsoldos, however, connected this data to Denis's second term as palatine