Andrew III of Hungary died on 14 January 1301, leaving no male heirs. The late king's rival, Charles of Anjou, who was Béla IV of Hungary's great-great-grandson, had regarded himself as the lawful king of Hungary for years. On hearing Andrew III's death, Charles of Anjou hurried to Esztergom where Gregory Bicskei, Archbishop-elect of Esztergom, crowned him king. Being Pope Boniface VIII's candidate for the Hungarian throne, Charles had always been unpopular, because the Hungarian lords feared that they would "lose their freedom by accepting a king appointed by the Church", according to the "Illuminated Chronicle". Charles's coronation was not performed with the Holy Crown of Hungary in Székesfehérvár, as it was required by customary law, but with a provisional crown in Esztergom. Accordingly, the Diet of Hungary declared Charles's coronation invalid on 13 May 1301.