and supporting his policies. New titles were conferred on Baha al-Dawla, and al-Qadir even agreed to marry the Buyid's daughter, although in the event she died just before the wedding was to take place. Seeing him as a Buyid puppet, the dynasts of the eastern Islamic world delayed recognition, and it was not until 1000 that the Samanids and Ghaznavids recognized al-Qadir's caliphate. The only independent actions taken during the first decade of his caliphate were the construction of a sixth Friday mosque in Baghdad, and the public proclamation of his just nine-year-old son Muhammad as heir apparent, with the title of al-Ghalib Bi'llah, in 1001. Al-Qadir faced two usurpation attempts during this time. About 998, a certain Abdallah ibn Ja'far, a close relative of the deposed al-Ta'i, pretended to be the escaped caliph in Gilan and even gained the backing of the local ruler for a time, before he was discovered. At about the same time, in Transoxiana, another distant cousin, Abdallah ibn Uthman, a descendant of the 9th-century caliph al-Wathiq, pretended to be al-Qadir's designated heir and won the support of the local Karakhanid ruler. Al-Qadir's proclamation of his son as heir was a response to this pretender. The Karakhanids soon recognized the Abbasid caliph's suzerainty for the first time, and dropped their support of the pretender. The pretender then arrived in Baghdad, where he secretly gathered support, before moving again to the east via Basra, Kufa, and Kirman. He was finally arrested by the Ghaznavids on al-Qadir's orders, and died in captivity. Championing of Sunnism Nevertheless, when Baha al-Dawla moved his residence to Shiraz, effectively downgrading Baghdad and Iraq to a mere province, this left al-Qadir more room for independent activity, which he used to strengthen his authority. With the Buyid ruler gone, the Caliph was able to establish his own chancery and nominate his own officials locally. While Baha al-Dawla had imposed his own candidates even as members of the caliphal court, al-Qadir was now able to re-hire the officials of al-Ta'i instead. Al-Qadir is also recorded as having a separate postal and information service, which he may have (re-)established. In this process he was aided by the broad popular support he could count on among the Sunni population of Baghdad, the decline of the Buyids' power, and the emergence of Mahmud of Ghazni () in the east, who was not only a political opponent of