Taking advantage of the weakened position of his rival, Charles of Anjou attempted to capture Buda, the capital of Wenceslaus-Ladislaus, in September 1302. After laying siege to Buda, Charles of Anjou called upon the burghers to extradite Wenceslaus-Ladislaus. The mainly German citizentry and their major, Werner, remained faithful to the young king and Ivan Kőszegi relieved the city in the same month. After Charles of Anjou withdrew from Buda, the papal legate placed the town under interdict. In response, a local priest excommunicated the pope and all Hungarian prelates. On 31 May 1303, Pope Boniface VIII declared Charles of Anjou the lawful king of Hungary, stating that Wenceslaus-Ladislaus's election had been invalid. Thereafter Albert I of Germany, who was the maternal uncle of both Wenceslaus-Ladislaus and Charles of Anjou, called on Wenceslaus-Ladislaus to withdraw from Hungary.