On 31 May 1303, Pope Boniface VIII declared Charles of Anjou the lawful king of Hungary, stating that Wenceslaus' election had been invalid. Simultaneously, the pope had recalled his papal legate Niccolò Boccasini, who placed the pro-Wenceslaus capital, Buda under interdict and excommunicated its city council. To strengthen his son's position, Wenceslaus II of Bohemia came to Hungary at the head of a large army in May 1304. He captured Esztergom, but his negotiations with the local lords convinced him that his son's position in Hungary had dramatically weakened. Accordingly, he decided to take Wenceslaus back to Bohemia and even took the Holy Crown of Hungary with himself to Prague in August 1304. Wenceslaus also captured and imprisoned rector Ladislaus, son of Werner, who supported Charles' claim by then, and abducted him into Bohemia. The aforementioned Petermann (Kunc's son) became the new rector of the town and leader of the German-origin patriarchy. Under his guidance, local priests excommunicated Niccolò Boccasini, who was elected as Pope Benedict XI by then after his return to the Roman Curia, in addition to the Hungarian archbishops and bishops, who almost unanimously supported the claim of Charles of Anjou to the Hungarian throne.
