Stephen II reorganized the parishes in the Diocese of Zagreb and in 1232 established a collegiate chapter in Čazma (also known as Bjenik or Pobjenik) with twelve canons, where he constructed a nearby settlement of Nova Čazma. The chapter had the opportunity to elect their provost from among the four candidates of the bishop of Zagreb, all of whom were members of the chapter of Zagreb. Historian Csaba Juhász analyzed the unique "arenga" (prelude) of the founding diploma of the Čazma Chapter, which paraphrases many wisdoms from the works of Saint Gregory the Great. He argued Stephen and his chancellor Andrew actively participated in the drafting of the document. Stephen invited Dominican friars to his diocese in order to counterbalance the spread of Bogomilism. During the First Mongol invasion of Hungary in 1241, Stephen left his diocese and fled to the coast of the Adriatic Sea. There, he joined the accompaniment of Béla IV, who took refugee in the well-fortified Trogir.