In Islamic eschatology, the Mahdi (Arabic: مهدي, ISO 233: mahdī "guided one") is the prophesied redeemer of Islam who will rule for five, seven, nine, or nineteen years (according to differing interpretations) before the Day of Judgement (yawm al-qiyamah, literally, the Day of Resurrection) and will rid the world of evil.
There is no explicit reference to the Mahdi in the Qur'an, but references to him are found in hadith (the reports and traditions of Muhammad's teachings collected after his death). According to Islamic tradition, the Mahdi's tenure will coincide with the Second Coming of Jesus Christ (Isa), who is to assist the Mahdi against the Masih ad-Dajjal (literally, the "false Messiah" or Antichrist). Differences exist in the concept of the Mahdi between Shia Muslims and adherents of the Sunni tradition. For Sunnis, the Mahdi is the Muslims' future leader who is yet to come. For most Shia Muslims, the Mahdi was born but disappeared and will remain hidden from humanity until he reappears to bring justice to the world, a doctrine known as the Occultation. For Twelver Shia, this "hidden Imam" is Muhammad al-Mahdi, the Twelfth Imam.
Throughout history, various individuals have claimed to be the Mahdi. These have included Muhammad Jaunpuri, founder of the Mahdavia sect; the Báb (Siyyid Ali Muhammad), founder of Bábism; Muhammad Ahmad, who established the Mahdist state in Sudan in the late 19th century; and Mirza Ghulam Ahmad, founder of the Ahmadiyya sect.