Lit. ‘riser’ or ‘resurrector.’ Used in early Shi‘i thought for a member of the family of Muhammad who was expected to restore justice on earth by rising against the regime considered as illegitimate. It also came to mean the eschatological mahdi. The title al-qa’im bi amr Allah was adopted by the second Fatimid caliph-imam (d. 946) and later by the 26th ‘Abbasid caliph (d. 1075). Some early Ismailis expected Imam Muhammad b. Ismail to return as the qa’im or mahdi. In the writings of Qadi Nu’man, qa’im designated the Fatimid imam-caliphs, who had assumed the functions of the qa’im to elucidate the hidden meaning (see batin) of the prescribed laws. However, some groups continued to expect the second coming of Muhammad b. Isma‘il as the qa’im who would end the last era of mankind. These Ismailis are sometimes called seveners (see sab‘iyya). The doctrine of qiyamat in Alamut gave a central role to the imam as the qa’im and gateway to the divine world (see qa’im al-qiyamah and khudawand-i qiyamat).