Overview
In Shia Islam, Qāʾim Āl Muḥammad () is an epithet for the Mahdi, the eschatological figure in Islam who is widely believed to restore the religion and justice in the end of time. The term was used as early as the eighth century to refer to a future member of the family of the Islamic prophet Muḥammad who would rise against tyranny in the end of time and restore justice. This term was already common by the end of the Umayyad caliphate and largely replaced the term Mahdi in Shia literature. The term was often qualified as al-Qa'im bi 'l-sayf () or al-Qa'im bi-amr Allah ().
Twelver Shia
Twelver eschatology is dominated by the figure of the twelfth Imam, Muhammad ibn Hasan al-Askari, the son of the eleventh Imam. The twelfth Imam is also known by the titles al-Mahdi (), al-Qa'im (), and Saheb al-Zaman (). It is believed that he was born around 868, and has been concealed by God from the humanity after the death of his father in 874, who was possibly poisoned by the Abbasids.
During the Minor Occultation (874-941), it is held that the twelfth Imam remained in contact with his followers through Four Deputies. During the Major Occultation (941-present), his life has been prolonged by divine will until the day he manifests himself again by God's permission to fill the earth with justice. In particular, there is no direct communication during the Major Occultation, though it is popularly held that the twelfth Imam occasionally appears to the pious in person or, more commonly, in dreams and visions. He is also viewed responsible in Twelver belief for the inward spiritual guidance of humankind (whereas his outward role begins with his reappearance).
Identification with the Mahdi
As early as the Minor Occultation (874-941), or possibly much earlier, Twelver sources identify the twelfth Imam with the messianic figure of Mahdi in Islam, though he is often referred to as al-Qa'im and less frequently as al-Mahdi. Al-Nu'mani, for instance, lived during the Minor Occultation and preferred the title al-Qa'im to al-Mahdi in his writings or joined the two as "al-Qa'im al-Mahdi." There is also a tradition ascribed to Ja'far al-Sadiq (), the sixth Imam, which explicitly identifies the promised al-Mahdi with al-Qa'im, which might indicate some confusion among the Shia about this.
From Wikipedia (CC BY-SA 4.0).