Reappearance of Muhammad al-Mahdi

The reappearance of Muhammad al-Mahdi is the Twelver eschatological belief in the return of their Hidden Imam in the end of time to establish peace and justice on earth. For Twelvers, this would end a period of occultation that began shortly after the death of Hasan al-Askari in 260 AH (873–874 CE), the eleventh Imam. While the miraculously prolonged life of the eschatological Mahdi is specific to Shia, the signs of his (re)appearance and his career are largely common in Shia and Sunni, and the belief in a messianic Mahdi remains popular among all Muslims, possibly owing to numerous traditions to this effect in canonical Sunni and Shia sources.

Historical background
Until their deaths, the tenth and eleventh of the Twelve Imams were held under close surveillance in the garrison town of Samarra by the Abbasids, who are often responsible in Shia sources for poisoning the two Imams, namely, Ali al-Hadi and Hasan al-Askari.

Contemporary to the tenth Imam, the Abbasid al-Mutawakkil heavily persecuted the Shia, partly due to a renewed Zaydi opposition. The restrictive policies of al-Mutawakkil towards the tenth Imam were later adopted by his son, al-Mu'tamid, who is reported to have kept the eleventh Imam under house arrest without any visitors. Instead, al-Askari is known to have mainly communicated with his followers through a network of representatives. Among them was Uthman ibn Sa'id, who is said to have disguised himself as a seller of cooking fat to avoid the Abbasid officers. Tabatabai suggests that these restrictions were placed on al-Askari because the caliphate had come to know about traditions among the Shia elite, predicting that the eleventh Imam would father the eschatological Mahdi.

Death of al-Askari
Al-Askari died in 260 (873-874) without an obvious heir. Immediately after the death of the eleventh Imam, his main representative, Uthman ibn Sa'id, claimed that the Imam had an infant son, named Muhammad. This infant was kept hidden from the public out of fear of Abbasid persecution, who sought to eliminate an expected child of al-Askari, whom persistent rumors described as a savior. Uthman also claimed that he had been appointed to represent the son of al-Askari, who is more commonly known as Muhammad al-Mahdi (lit. 'the rightly guided').

Being the closest associate of al-Askari, Uthman's assertions were largely accepted by other representatives of al-Askari. Those followers who accepted the imamate of this Muhammad later formed the Twelvers. The other sects created over the succession of al-Askari disappeared within a hundred years.

Occultation
Thus began a period of about seventy years, later termed the Minor Occultation (, 260-329 AH, 874–941 CE), during which it is believed that four successive agents represented Muhammad al-Mahdi, the Hidden Imam, starting with Uthman ibn Sa'id as the first agent. The fourth agent, Abu al-Hasan al-Samarri, is said to have received a letter from Muhammad al-Mahdi shortly before his death in 941 CE. The letter predicted the death of al-Samarri in six days and announced the beginning of the complete occultation, later called the Major Occultation, which continues to this day. The letter, ascribed to al-Mahdi, added that the complete occultation would continue until God permitted him to manifest himself again in a time when the earth would be filled with tyranny.

In Twelver belief, the life of al-Mahdi has been miraculously prolonged. Al-Mahdi is also viewed responsible for the affairs of men and, in particular, their inward spiritual guidance during the occultation.

Career of al-Mahdi
Shortly before the Day of Judgment, when commanded by God, al-Mahdi will return to lead the forces of righteousness against the forces of evil in an apocalyptic war that would ultimately establish peace and justice on earth, according to the Twelvers. In his mission, al-Mahdi will be assisted by Jesus, who will kill al-Dajjal (antichrist) in some Islamic accounts. Al-Mahdi would also be accompanied by 313 loyal followers, their number identical to the number of Muslim warriors in the Battle of Badr. He is expected to reemerge as a young man in possession of the relics of the past prophets, such as the staff and arc of Moses. The time of his reappearance is unknown, however, and Shia hadiths expressly forbid haste (este'jal) and setting time (tawqit) for his return.

In Twelver thought, al-Mahdi is also expected to avenge the injustices suffered by Husayn, grandson of the prophet, whose innocent blood is believed to have plunged the Muslim community into a cycle of violence, corruption, and oppression. This vengeance is necessary, it is said, to rid the Muslim community of the most odious crime ever committed in their name. It also involves the return to life of the evildoers and their victims, which is known as the doctrine of return (al-raj'a).

Al-Mahdi is also viewed by the Twelvers as the restorer of true Islam, and the restorer of other monotheistic religions after their distortion and abandonment. In their true form, it is believed, all monotheistic religions are essentially identical to Islam as "submission to God." It is in this sense, according to Amir-Moezzi, that one should understand the claims that al-Mahdi will impose Islam on everyone. In Twelver belief, al-Mahdi will also reveal the unaltered scriptures of the past prophets, and bring wisdom to mankind by revealing the esoteric secrets of these texts.

Al-Mahdi is expected to announce his return next to Kaaba in Mecca. The Meccans will kill two successive deputies of al-Mahdi, according to a hadith ascribed to Ja'far al-Sadiq, the sixth Imam. Soon, however, the Hejaz, Iraq, the east, Egypt, Syria, and then Constantinople would fall to the army of al-Mahdi before the complete extermination of the forces of evil, after which the rule of justice would be established on earth and the humanity would be revived. There is no consensus on the duration of his rule, but the power remains in the hands of his initiates until the Day of Judgment. Al-Mufid, however, holds that there would be no government after that of al-Mahdi.

Madelung notes that Sunni and Shia traditions have much in common about the career of the eschatological Mahdi. Indeed, the belief in Mahdi remains popular among all Muslims, possibly owing to numerous traditions to this effect in canonical Sunni and Shia sources.

Signs of his reappearance
Numerous Shia hadiths predict that the reappearance of al-Mahdi would be heralded by some signs. Momen lists several such signs which are said to be common to both Sunni and Shia beliefs. Among the signs for the advent of al-Mahdi, some are inevitable, and others are conditional, i.e., might change by divine decision. Alternatively, some of these signs are general, and some are specific. The foremost general sign of the second coming of al-Mahdi is the prevalence of evil on earth in the form of tyranny, injustice, and religious and moral degradation. In particular, at the time, Islam would be devoid of its soul and practiced only outwardly. Only a fraction of the Shia, those who truly practice their Imams' teachings, will remain on the righteous path in the end of time.

Among the special signs are the rise of Sufyani, who would later command the enemies of al-Mahdi, the rise of Yamani, who would later support al-Mahdi, the divine cry which calls upon men to join al-Mahdi, often followed shortly by another supernatural cry from the earth that invites men to join the enemies of al-Mahdi, and would appeal to disbelievers and hypocrites, the swallowing up (kasf) of an army dispatched by Sufyani in a desert, and the assassination by Meccans of the messenger of al-Mahdi, referred to as the pure soul (an-nafs az-zakiya).

Some of the conditions for the return of al-Mahdi are said to have been fulfilled by modern technology. For instance, al-Zanjani suggests that a hadith attributed to Ja'far al-Sadiq, the sixth Imam, refers to television. The hadith predicts that, in the time of al-Mahdi, a believer in the east can see another believer in the west and vice versa.