Muḥammad ibn al-Ḥasan al-Mahdī
(محمد ابن الحسن المهدى)
(born c. July 29, 869; 15 Sha‘bān 255 AH) is a believed by Twelver Shī‘a Muslims to be the Māhdī, an ultimate savior of humankind and the final Imām of the Twelve Imams. Twelver Shī‘a believe that al-Māhdī was born in 869 and did not die but rather was hidden by God (this is referred to as the Occultation) and will later emerge with Isa in order to fulfill their mission of bringing peace and justice to the world. He assumed the Imamate at 5 years of age. Sunnīs and other Shī‘ah schools do not consider ibn-al-Hasan to be the Mahdī , though the mainstream sect Twelvers do.
Birth and early life according to Twelver Shi'a
Twelver Shi'as believe that Mahdi was born in 869 AD as Abu'l Qasim Hujjat ibn Hasan ibn ‘Alī. There are a couple narrations regarding the origin of his mother. One is that his mother, Narjis (Melika), was a Byzantine princess who pretended to be a slave so that she might travel from her kingdom to Arabia. Another narration says she was from Africa. His father, Hasan al-Askari, is believed to have been the eleventh and penultimate Shi'a Imam. Shi'as believe that his birth was kept a secret due to the persecution that the Shi'a were facing during this time at the hands of Al-Mu'tamid, the Abbasid Caliph.
To support Imam Mahdi's claim, Twelver Shi'as along with all other Muslim sects quote the following Hadith: "I and `Ali are the fathers of this nation; whoever knows us very well also knows Allah, and whoever denies us also denies Allah, the Unique, the Mighty. And from `Ali's descendants are my grandsons al-Hasan and al-Husayn, who are the masters of the youths of Paradise, and from al-Husayn's descendants shall be nine: whoever obeys them obeys me, and whoever disobeys them also disobeys me; the ninth among them is their Qa'im and Mahdi." 
The eleventh Shi'a Imam Hasan al-Askari died on 1 January 874 AD (8th Rabi' al-awwal, 260 AH) and since that day, his son Mahdi is believed by Shi'as to be the Imam, appointed by Allah, to lead the believers of the era. The most popular account of al-Mahdi in Shi'a literature is taken from his father's funeral. It is reported that as the funeral prayer was about to begin, al-Mahdi's uncle, Jafar ibn Ali approached to lead the prayers. However, al-Mahdi approached and commanded, "Move aside, uncle; only an Imam can lead the funeral prayer of an Imam." Jafar moved aside, and the five-year-old child led the funeral prayer for his father. It is reported that it was at this very moment that al-Mahdi disappeared and went into ghaybat, or occultation.
Significance of the Twelfth Imam
Some hadith indicate significance to the twelfth generation of descendants of Muhammad.
A hadith from the Shi'a text (Kitab Al-Kafi) containing a conversation between the first Shia Imam Ali ibn Abu Talib and a man named al-Asbagh ibn Nubata, as well as a Hadith in Sahih Bukhari and Sahih Muslim in which Muhammad speaks of Twelve Successors.
From Sahih Bukhari:
Narrated Jabir bin Samura: I heard Muhammad saying, "Islam will continue to be strong to twelve Muslim rulers." He then said a sentence which I did not hear. My father said, "All of them (those rulers) will be from Quraish." 
In a hadith widely regarded as authentic, Muhammad said,
Even if the entire duration of the world's existence has already been exhausted and only one day is left before the Day of Judgment, Allah will expand that day to such a length of time, as to accommodate the kingdom of a person out of Ahl al-Bayt who will be called by my name and my father's name. He will then fill the Earth with peace and justice as it will have been filled with injustice and tyranny before then.
Main article: The Occultation
Shi'as believe that, for various reasons, Allah concealed the twelfth and current Shi'a Imam, al-Mahdi, from humankind.
The period of occultation (ghaybat) is divided into two parts:
* Ghaybat al-Sughra or Minor Occultation (874–941), consists of the first few decades after the Imam's disappearance when communication with him was maintained through deputies of the Imam.
* Ghaybat al-Kubra or Major Occultation began 941 and is believed to continue until a time decided by God, when the Mahdi will reappear to bring absolute justice to the world.
Main article: Minor Occultation
During the Minor Occultation (Ghaybat al-Sughra), it is believed that al-Mahdi maintained contact with his followers via deputies (Arab. an-nuwāb al-arbaʻa literal: the four leaders). They represented him and acted as agents between him and his followers.
Whenever the believers faced a problem, they would write their concerns and send them to his deputy. The deputy would ascertain his verdict, endorse it with his seal and signature and return it to the relevant parties. The deputies also collected zakat and khums on his behalf. For the Shia, the idea of consulting a hidden Imam was not something new because the two prior Shia Imams had, on occasion, met with their followers from behind a curtain. Also, during the oppressive rule of the later Abbasid caliphs, the Shia Imams were heavily prosecuted and held prisoners, thus their followers were forced to consult their Imams via messengers or secretly.
Shia Tradition hold that four deputies acted in succession to one another:
1. Uthman ibn Sa’id al-Asadi
2. Abu Jafar Muhammad ibn Uthman
3. Abul Qasim Husayn ibn Ruh al-Nawbakhti
4. Abul Hasan Ali ibn Muhammad al-Samarri
In 941 (329 AH), the fourth deputy announced an order by al-Mahdi, that the deputy would soon die and that the deputyship would end and the period of the Major Occultation would begin.
The fourth deputy died six days later and the Shi'a Muslims continue to await the reappearance of the Mahdi. In the same year, many notable Shi'a scholars such as Ali ibn Babwayh Qummi and Muhammad ibn Yaqub Kulayni, the learned compiler of al-Kafi also died.
Main article: Major Occultation
The name of Imam as it appears in Masjid Nabawi
According to the last letter of al-Mahdi to Ali ibn Muhammad al-Samarri "from the day of your death [the last deputy] the period of my major occultation (al ghaybatul kubra) will begin. Hence forth, no one will see me, unless and until Allah makes me appear." Another view is that the Hidden Imam is on earth "among the body of the Shia" but "incognito." "Numerous stories" exist of the Hidden Imam "manifesting himself to prominent members of the ulama."
Twelver Shi'as cite various references from the Qur'an and reports, or Hadith, from Imam Mahdi and the twelve Shi'a Imams with regard to the reappearance of al-Mahdi who would, in accordance with Allah's command, bring justice and peace to the world by establishing Islam throughout the world.
Mahdi is reported to have said:
Shi'as believe that Imam al-Mahdi will reappear when the world has fallen into chaos and civil war emerges between the human race for no reason. At this time, it is believed, half of the true believers will ride from Yemen carrying white flags to Makkah, while the other half will ride from Karbala, in Iraq, carrying black flags to Makkah. At this time, Imam al-Mahdi will come wielding Allah's Sword, the Blade of Evil's Bane, Zulfiqar (Arabic: ذو الفقار, ðū l-fiqār), the Double-Bladed Sword. He will also come and reveal the texts in his possession, such as al-Jafr and al-Jamia.
Shi'as believe that Jesus will also come, (after Imam Mahdi's re-appearance to follow him.) the Imam Mahdi to destroy tyranny and falsehood, and to bring justice and peace to the world.
The 12th Imam is known by many titles in Shia Islam, including:
* Al-Mahdi (the Guided one)
* Al-Muntathar (the Awaited one)
* Al-Qa'im (the Rising one)
* Sahab az-Zaman (the Master of the Age)
* Imam az-Zaman (the Leader of the Age)
* Wali al-'Asr (the Guardian of the Era or alternatively, the Guardian in the Twilight [of man])
* Al-Hujjah (the Proof [of Allah's justice])
In Ahmadiyya Islam, the terms "Messiah" and "Mahdi" are synonymous terms for one and the same person. Like the term Messiah which, among other meanings, in essence means being anointed by God or appointed by God the term "Mahdi" means guided by God, thus both imply a direct ordainment and a spiritual nurturing by God of a divinely chosen individual. According to Ahmadiyya thought, Messiahship is a phenomenon, through which a special emphasis is given on the transformation of a people by way of offering suffering for the sake of God instead of giving suffering (i.e. refraining from revenge). Ahmadis believe that this special emphasis was given through the person of Jesus and Mirza Ghulam Ahmad  among others.
Ahmadis hold that the prophesied eschatological figures of various religions, the coming of the Messiah and Mahdi in fact were to be fulfilled in one person who was to represent all previous prophets. The prophecies concerning the Mahdi or the second coming of Jesus are seen by Ahmadis as metaphorical, in that one was to be born and rise within the dispensation of Muhammad, who by virtue of his similarity and affinity with Jesus of Nazareth, and the similarity in nature, temperament and disposition of the people of Jesus' time and the people of the time of the promised one (the Mahdi) is called by the same name.
Numerous Hadith are presented by the Ahmadis in support of their view such as one from Sunan Ibn Majah which says:
“ There is No Mahdi but Jesus son of Mary ”
—Ibn Majah, Bab, Shahadatu-Zaman
Ahmadis believe that the prophecies concerning the Mahdi and the second coming of Jesus have been fulfilled in the person of Mirza Ghulam Ahmad of Qadian (1835–1908) the founder of the Ahmadiyya Movement. Contrary to mainstream Islam the Ahmadis do not believe that Jesus is alive in heaven, but that he survived the crucifixion and migrated towards the east where he died a natural death and that Ghulam Ahmad was only the promised spiritual second coming and likeness of Jesus, the promised Messiah and Mahdi.
The majority of Sunni Muslims do but not consider the son of Hasan al-Askari to be the Mahdi nor to be in occultation. However, they do believe that the Mahdi will come from Muhammad's family, more specifically from Al-Hasan's descendants. Sunnis believe that the Mahdi has not yet been born, and therefore his exact identity is only known to Allah. Aside from the Mahdi's precise, genealogy, Sunnis accept many of the same hadiths Shias accept about the predictions regarding the Mahdi's emergence, his acts, and his universal Khilafat. Sunnis also have a few more Mahdi hadiths which are not present in Shia collections, such as the following:
Abu Sa'id al-Khudri narrated that Muhammad said:
Our Mahdi will have a broad forehead and a pointed (prominent) nose. He will fill the earth with justice as it is filled with injustice and tyranny. He will rule for seven years
—Abu Sa'id al-Khudri, 
Shia books do not explicitly mention the Mahdi having a pointed (prominent) nose.
Other Sunni hadith regarding the Mahdi are virtually identical to their counterparts in Shia books:
Umm Salamah said:
I heard the Messenger of Allah say: "The Mahdi is of my lineage and family"
—Umm Salamah, 
Abu Sa’eed al-Khudri said:
The Messenger of Allah said: "He is one of us"
—Abu Sa’eed al-Khudri, 
In the light of traditions and interpretations, the personality of the Promised Mahdi would be as such:
It is said "predictions and lore concerning the Mahdi abound" Among them are that the promised Mahdi would be a Caliph of God and that to make a covenant with him is obligatory. He would belong to the House of Muhammad and would be in the line of Imam Hasan. His name would be Muhammad and his family name would be Abul Qasim, his father's name would be ‘Abdu’llah [rather than Hasan], and he would appear in Mecca. He would protect the Muslims from destruction and would restore the religion to its original position.
Sunnis also believe that Jesus will return alongside the Mahdi, with the only difference being that they disagree with the Shia regarding exactly who the Mahdi is.
Some scholars, including Bernard Lewis also point out, that the idea of an Imam in occultation was not new in 873 but that it was a recurring factor in Shia history. Examples of this include the cases of Muhammad ibn al-Hanafiyyah (according to the Kaysanites Shia), Muhammad ibn Abdallah An-Nafs Az-Zakiyya, Musa al-Kadhim (according to the Waqifite Shia), Muhammad ibn Qasim (al-Alawi), Yahya ibn Umar and Muhammad ibn Ali al-Hadi (according to the Muhammadite Shia).
* ‘Alī ibn Abī Tālib
* Hasan ibn ‘Alī
* Husayn ibn ‘Alī
* ‘Alī Zaynul ‘Ābidīn
* Muhammad al-Bāqir
* Ja‘far as-Sādiq
* Mūsā al-Kādhim
* ‘Alī ar-Ridhā
* Muhammad at-Taqī
* ‘Alī al-Hādi
* Hasan al-‘Askarī
* Muhammad al-Mahdī
* Holiest sites in Islam (Shia)
* Fatimid Empire
* People claiming to be the Mahdi
1. a b c d e f g h i j k A Brief History of The Fourteen Infallibles. Qum: Ansariyan Publications. 2004. pp. 159.
2. al-Qurashi, Baqir Shareef (2006). The Life of Imam al-Mahdi. Qum: Ansariyan Publications. pp. 40.
3. A Brief History of The Fourteen Infallibles. Qum: Ansariyan Publications. 2004. pp. 160.
4. The Expected Mahdi
5. Online Islamic Courses
6. a b The Imams
7. mahdi and the manner of his occultation
8. Ikmal of AlSaduq
9. Sahih Bukhari 89.329
10. |Sahih Tirmidhi, V2, P86, V9, P74–75.
11. Momen, Moojan, An Introduction to Shi'i Islam, Yale University Press, 1985, p.199
12. Sahih Muslim, bab nuzul 'isa, Vol. 2; Sahih Bukhari, kitab bad' al-khalq wa nuzul 'isa, Vol. 4
13. Ask Islam: What is the different between a messiah and a prophet?
16. Abu Dawud, Sahih, Vol. 2, p. 208; Fusul al-muhimma, p. 275
17. Sunan Abu Dawud, 11/373; Sunan Ibn Maajah, 2/1368
18. Reported by Abi Na’eem in Akhbaar al-Mahdi, see al-Jaami’ al-Sagheer, 5/219, hadith 5796
19. The Assassins: A Radical Sect in Islam, Bernard Lewis, pp. 23, 35, 49.