At Cairo, he learned mainly under the Fatimid "dā‘ī" ("missionary") Mu'ayyad fid-Din al-Shirazi, and became thoroughly imbued with the Shi'a Isma'ili doctrines of the Fatimids, and their introduction into his native country was henceforth the sole object of his life. He was raised to the position of "dā‘ī" "missionary" and appointed as the "Hujjat-i Khorasan", though the hostility he encountered in the propagation of these new religious ideas after his return to Greater Khorasan in 1052 A.D. and Sunnite fanaticism compelled him at last to flee. After wandering from place to place, he found refuge in Yamgan (about 1060 A.D.) in the mountains of Badakhshan, where he spent as a hermit the last decades of his life, gathering a considerable number of devoted adherents, who have handed down his doctrines to succeeding generations.