Mahdi

'the Guided'; Persian: مهدی) is a figure in Islamic eschatology who is believed to appear at the End of Times to rid the world of evil and injustice.

As an honorific, it was used in some instances to describe Muhammad (by Hassan ibn Thabit), Abraham, al-Husayn, and various Umayyad caliphs (هداة مهديون, hudat mahdiyyun).

Abd Allah ibn al-Zubayr, who laid claim to the caliphate against the Umayyads and found temporary success during the civil war, presented himself in this role.

After defeating rebels in the nearby Medina, the army besieged Mecca but was forced to withdraw as a result of Yazid's sudden death shortly afterward.

Ibn al-Zubayr was recognized caliph in Arabia, Iraq, and parts of Syria, where Yazid's son and successor Mu'awiya II (r. 683–684) held power in Damascus and adjoining areas.

Hasan al-Basri (d. 728) opposed the concept of a Muslim Messiah but believed that if there was the Mahdi, it was Umar ibn Abd al-Aziz.

[26] For instance, these traditions were cited by the now-extinct Kaysanites, who denied the death of Ibn al-Hanafiyya,[16][27] and held that he was in hiding in the Razwa mountains near Medina.

[3] This likely originated with two groups of his supporters, namely, southern Arabian settlers and local recent converts in Iraq, who seem to have spread the notions now known as occultation and raj'a.

[24] In parallel, traditions predicting the occultation of a future imam also persisted in the writings of the mainstream Shia, who later formed the Twelvers.

[25][16] Based on this material, the Twelver doctrine of occultation crystallized in the first half of the fourth (tenth) century,[28] in the works of Ibrahim al-Qummi (d. 919), Ya'qub al-Kulayni (d. 941), and Ibn Babawayh (d. 991), among others.

Their efforts gained momentum in the seventh (thirteenth) century when some notable Sunni scholars endorsed the Shia view of the Mahdi,[16][31] including the Shafi'i traditionist Muhammad ibn Yusuf al-Gandji.

[16] Before the rise of the Fatimid Caliphate, as a major Isma'ili Sh'a dynasty,[32] the terms Mahdi and Qa'im were used interchangeably for the messianic imam anticipated in Shia traditions.

[16][33] One exception is the now-extinct Husaynites in Yemen, who denied the death of al-Husayn ibn al-Qasim al-Iyani and awaited his return.

[38][3] Others, like the historian and the Qur'an commentator Ibn Kathir (d. 1373), elaborated a whole apocalyptic scenario which includes prophecies about the Mahdi, Jesus, and the Dajjal (the antichrist) during the end times.

[3] He is held to be from among the descendants of Muhammad through his daughter Fatima and her husband Ali, and his physical characteristics including a broad forehead and curved nose.

[44] In the aftermath of the death of a king, the people would quarrel among themselves, and the as yet unrecognized Mahdi would flee from Medina to Mecca to take refuge in the Ka'ba.

When the latter appears, the Sufyani, along with his army, will either be swallowed up en route to Mecca by the earth with God's command or defeated by the Mahdi.

[49] For the Twelver Shia, the Mahdi was born but disappeared, and would remain hidden from humanity until he reappears to bring justice to the world in the end of time, a doctrine known as the Occultation.

[55][56] With the death of the fourth agent, thus began the Major Occultation (الغيبة الكبرى, ghayba al-kubra), in which the communication between the Mahdi and the faithful was severed.

[60][31][61] Shia scholars have argued that the longevity of the Mahdi is not unreasonable given the long lives of Khidr, Jesus, and the Dajjal, as well as secular reports about long-lived men.

[62] He is viewed as the sole legitimate ruler of the Muslim world and the constitution of the Islamic Republic of Iran recognizes him as the head of the state.

[63] Before his reappearance (Arabic: ظهور, romanized: ṭuhūr), the world will plunge into chaos, where immorality and ignorance will be commonplace, the Qur'an will be forgotten, and religion will be abandoned.

The Mahdi will then reappear in Mecca, with the sword of Ali (ḏū l-fiqār) in his hand,[59] between the corner of the Ka'ba and the station of Abraham.

[66] This is often followed shortly by another supernatural cry from the earth that invites men to join the enemies of the Mahdi,[18][67] and would appeal to disbelievers and hypocrites.

By the mid-9th century, Isma'ili groups of different persuasions had coalesced into a unified movement centered in Salamiyya in central Syria,[74] and a network of activists was working to collect funds and amass weapons for the return of the Mahdi Muhammad ibn Isma'il, who would overthrow the Abbasids and establish his righteous caliphate.

[b][76][77] The propaganda of the Mahdi's return had a special appeal to peasants, Bedouins, and many of the later-to-be Twelver Shias, who were in a state of confusion (hayra) in the aftermath of the death of their 11th imam Hasan al-Askari, and resulted in many conversions.

Those in Iraq and Arabia, known as Qarmatians after their leader Hamdan Qarmat, still held that Muhammad ibn Isma'il was the awaited Mahdi and denounced the Salamiyya-based Mahdism.

[79] Al-Mahdi attempted to downplay messianism and asserted that the propaganda of Muhammad ibn Isma'il's return as the Mahdi had only been a ruse to avoid Abbasid persecution and protect the real imam predecessors of his.

[79] The Tayyibi Musta'li Isma'ili Shia believe that their Occulted Imam and Mahdi is Abu'l-Qasim al-Tayyib, son of the Fatimid Caliph Al-Amir bi-Ahkam Allah.

[97][98] Similarly, the Mahdi is not an apocalyptic figure to launch global jihad and conquer the world, but a peaceful mujaddid (renewer of religion), who spreads Islam with "heavenly signs and arguments".

An image from a Falname made in India around 1610-1630, depicts Jesus fighting the Dajjal (right). Behind, the Mahdi with a veiled face.
The Al-Askari Shrine in Samarra , Iraq , stands where the house of the 11th Twelver imam Hasan al-Askari and the Mahdi once used to be.
Jamkaran Mosque in Qom , Iran , where Hassan ibn Muthlih Jamkarani is reported to have met the Twelver Mahdi
Gold dinar of the first Fatimid caliph, Abd Allah al-Mahdi Billah , 910/911