Abū Hurayra quotes the Messenger of Allāh (ṣ) as saying...
Abū Hurayra quotes the Messenger of Allāh (ṣ) as saying, “How will you be if the son of Maryam (Mary) descends among you and your own Imām is your king?!”[^4] Al-Hāfidh, in Sharh Sahīh al-Bukhāri , has said, “Narratives are consecutively reported that al-Mahdi is from this nation, and that Jesus son of Mary will descend and pray behind him.”[^5] The Fiqh Assembly of the Muslim World League (Rabitat al-Aalam al-Islami) issued the following fatwa (verdict) dated May 31, 1976 about the Awaited Mahdi: “Al-Mahdi, peace be upon him, is Muhammad ibn Abdullāh al-Hasani al-Alawi al-Fatimi al-Mahdi, the Awaited One.
The time of his appearance is at the end of time, and it [appearance] is one of the signs of the Great Hour. He shall come out from the west, and he will receive the oath of allegiance in Hijaz, in Venerable Mecca, between the Rukn and Maqam [of Ibrahim], between the Honored Ka’ba and the fixed Black Stone.
He will appear when there is a great deal of corruption, when disbelief spreads and when people oppress, and he will fill the earth with justice and equity just as it was filled with injustice and oppression. He shall rule the entire world and everyone will be his subject, once through conviction and once through war.
He shall rule the earth for seven years, and Jesus, peace be upon him, will descend after him and kill the Dajjāl [anti-Christ] or descends with him and helps him kill him at the Ludd Gate on the land of Palestine. And he is the last of the twelve righteous caliphs about whom the Prophet (ṣ) spoke as recorded in the Sahīh books...
The belief in the appearance of al-Mahdi is obligatory, and it is one of the tenets of the followers of Sunnah and Jamā’ah and is not denied except by one who is ignorant of the Sunnah and one who brings an innovation into the creed.”[^6] Hence, Sunnis agree with the Shī’ahs that Imām al-Mahdi (‘atfs) is the last of the Twelve Caliphs about whom the Messenger of Allāh (ṣ) gave the glad tidings, and both parties agree on most other points relevant to the Awaited Imām.
As regarding their differences in his regard, these are: First: Most Sunnis believe Imām al-Mahdi (‘atfs) will be born at the end of time, while the Shī’ahs believe he was born in 255 A.H. (869 A.D.) to his father Imām al-Hasan al-Askari (‘a), the twelfth among the Imāms from among Ahlul Bayt (‘a), but Allah Almighty veiled him from the eyes for a wisdom which He decreed, and he remains alive and will come out at the end of the time.