 He claimed descent through Isma'il ibn Jafar, the seventh Ismaili Imam, from Fatimah and her husband ʻAli, the first Shiʻi Imam, whence his name "al-Fāṭimiyy" "the Fatimid".The eighth to tenth Ismaili Imams, Ahmad al-Wafi, Muhammad at-Taqi () and ʻAbdullāh al-Raḍī (died 881), remained hidden and worked for the movement against the rulers of the period.Together with his son, the 11th Imam Abdullah al-Mahdi Billah (lived 873–934), in the guise of a merchant, made his way to Sijilmasa (now in Morocco), fleeing persecution by the Abbasid Caliphate, who found Ismaʻili beliefs heretical and also a political threat.