the Buyids, but also a champion of Sunni orthodoxy. Mahmud's recognition of his suzerainty was a boost to al-Qadir, and the Ghaznavid ruler regularly kept the caliph informed of his campaigns, requesting caliphal confirmation for his rule over the countries he had conquered. Although al-Qadir held no temporal political power, he nevertheless managed to exploit the opportunities he was presented with to greatly restore the moral and religious authority of the caliphate. Already in 1000, al-Qadir wrote to the of Jilan to urge the local populace to obey the caliph. The test came in 1003/4, when Baha al-Dawla tried to appoint a leading Alid, Abu Ahmad al-Musawi, as the chief at Baghdad. Seeing in this an attempt to impose Twelver jurisprudence against Sunni practices, al-Qadir put himself at the head of a popular Sunni reaction, and successfully resisted the nomination. From this point on, the caliph placed himself at the forefront of a Sunni reaction against the Shi'a, both the Imami or Twelver variant, as well as the Isma'ili branch held by the rival Fatimid Caliphate. In this cause he succeeded in restoring the Sunni and Abbasid form of the in Yamamah and Bahrayn. When a violent controversy broke out over the recension () of the Quran by Ibn Mas'ud, which the Sunnis rejected but the Shi'a supported, al-Qadir summoned a commission of scholars that condemned the recension in April 1006, and ordered the execution of a Shi'a partisan who anathematized those who burned it. It was only the intervention of Baha al-Dawla that calmed matters and prevented the disorders from spreading. Fatimid threat and the Baghdad Manifesto The affair had also highlighted another threat, namely the inroads of Fatimid propaganda in Baghdad, where the name of the Fatimid caliph, al-Hakim bi-Amr Allah () was hailed during the riots over Ibn Mas'ud's recension. This was a development that threatened the Sunni Abbasids and the Twelver Buyids alike, especially when Qirwash ibn al-Muqallad, the Uqaylid emir of Upper Mesopotamia, whose power stretched to the vicinity of Baghdad, recognized the suzerainty of the Fatimid caliph in August 1010. Al-Qadir responded by sending an embassy to Baha al-Dawla that succeeded in getting the Buyid ruler to apply pressure on the Uqaylid emir, who soon returned to Abbasid allegiance. The Emirs of Mecca also recognized Fatimid suzerainty, and for many years, Hajj pilgrims from Iraq were unable to visit the city as the security