1. The Beginning of the Belief in the Mahdi
2. The Mahdi from among the Descendants of the Prophet
3. The Sunni hadith on the Subject of the Mahdi
4. The Objection Raised by One of the Authors
5. Ibn Khaldun and the Traditions about the Mahdi
6. Other Opinions from Ibn Khaldun
7. The Existence of the Mahdi is Certain
8. People Awaited the Appearance of the Mahdi
9. The Discussion among the Companions and the Subsequent Generations
10. The Jurists of Medina and the Mahdi Traditions
11. The Poetry of Di'bil and the Mahdi
The Beginning of the Belief in the Mahdi
Dr. Emami: When did the belief in Mahdi become prevalent in the Islamic environment? Was there any conversation about the Mahdi during the time of the Prophet (peace be upon him and his progeny) or was it after his death that the belief became widespread among Muslims? There are some who have written that there was no Mahdiism in the beginning of Islam. It was only in the second half of the first century (7th century CE) that the idea appeared among the Muslims. There was a group that regarded Muhammad b. Hanafiyya as the Mahdi and gave the good news to the people about the good fortune Islam would acquire through him. The same group believed that Muhammad b. Hanafiyya had not died but he was living in Mt. Radwa and one day would return."
Mr. Hoshyar: The belief in Mahdi was widespread during the time of the Prophet. The Prophet (peace be upon him and his progeny) on more than one occasion had announced the future coming of the Mahdi. From time to time he would inform the people about the government of the Mahdi and the signs of his emergence giving his name and patronymic (kunya). There are numerous hadith-reports that have come down to us from both the Sunni and the Shi'i sources on this subject. Actually some of these reports have been related so frequently and without interruption in all ages that nobody can doubt their authenticity. For instance we read the following hadith reported from 'Abd Allah b. Mas'ud who heard the Prophet say:
The world will not come to an end until a man from my family (ahl al-bayt) who will be called al-Mahdi emerges to rule upon my community.
Another tradition reported by Abu al-Hujaf quotes the Prophet saying three times:
Listen to the good news about the Mahdi! He will rise at the time when people will be faced with severe conflict and the earth will be hit by a violent quake. He will fill the earth with justice and equity as it is filled with injustice and tyranny. He will fill the hearts of his followers with devotion and will spread justice everywhere.
The Prophet has declared:
The Day of Resurrection will not take place until the True Qa'im rises. This will happen when God permits him to do so. Anyone who follows him will be saved and anyone who opposes him will perish. O servants of God keep God in your mind and go towards him even if it happens to be on the ice for indeed he is the caliph of God the Exalted and Glorified and my successor.
In another hadith the Prophet is reported to have said: "Any one who denies al-Qa'im among my children will have denied me."
In still another hadith the Prophet assured his community by stating:
"The world will not come to an end until a man from the descendants of Husayn takes charge of the affairs of the world and fills it with justice and equity as it is filled with injustice and tyranny.
The Mahdi from among the Descendants of the Prophet
Such hadith-reports are abundant. The main idea that runs through all of them suggests that the topic about the future coming of the Mahdi and Qa'im during the time of the Prophet (peace be upon him and his progeny) was well known. In fact the way these reports speak about the subject indicates that it was not something new which was being presented to the people. On the contrary they relate the signs and characteristics of the person who would emerge as the Mahdi as in the statement "the promised Mahdi will be among my descendants."
The following traditions reflect such a pattern in their presentation. It is reported from 'Ali b. Abi Talib who said:
I asked the Prophet: "Is Mahdi going to be among our own family or from some other?" He replied: "He will be among us. God will conclude His religion through him just as He began it with us. It will be through us that people will find refuge from sedition just as it was through us that they were saved from polytheism. Moreover it will be through us that God will bring their hearts together in brotherhood following the animosity sown by the sedition just as they were brought together in brotherhood in their religion after the animosity sown by polytheism."
Abu Sa'id al-Khudari a close associate of the Prophet says:
"I heard the Prophet declare from the pulpit: "The Mahdi from among my descendants from my family will rise at the End of Time while the heavens will pour rain and the earth will bring forth green grass for him. He will fill the earth with justice and equity as it is filled with tyranny and injustice."
In another tradition from Umm Salma the wife of the Prophet there is even more specific information given to the community. The Prophet says: "Mahdi will be among my progeny among the children of Fatima."
On another occasion the Prophet said:
"The Qa'im will be among my descendants. His name will be my name and his patronymic will be my patronymic. His character will be like my own. He will call people to my custom and to the Book of God. Anyone who obeys him would be obeying me and any one who turns away from him would be turning away from me. Anyone who denies his existence during his concealment would have denied me and anyone who falsifies him would have falsified me. Anyone who confirms his existence would have confirmed my existence. As for those who are engaged in falsifying what I have said about him and thereby mislead my community I will complain against them to God. "Those who do wrong shall surely know by what overturning they will be overturned." [28:228] 
Abu Ayyub Ansari says: I heard the Prophet (peace be upon him and his progeny) say: "I am the chief of the prophets and 'Ali is the chief of the legatees. My two grandsons are the best among the descendants. The infallible Imams will come forth from among us through Husayn. Moreover the Mahdi of this community is among us." At that time an Arab stood up and asked: "O Prophet of God how many Imams are there after you?" He replied: "Equal to the number of the apostles of Jesus and the chiefs of the Children of Israel." 
A tradition with similar information has been cited from Hudhayfa another companion of the Prophet who heard the Prophet declare:
The Imams after me will be equal to the number of the tribal chiefs among the Children of Israel. Nine among them will be the descendants of Husayn. The Mahdi of this community is among us. Beware! Truth is with them and they are with truth. Thus be careful of the way you treat them after me. 
In still another tradition Sa'id b. Musayyib reports from 'Amr b. 'Uthman b. 'Affan who said:
We heard from the Prophet saying: "The Imams after me will be twelve in number of whom nine will be from the progeny of Husayn. Moreover the Mahdi of this community will be among us. Anyone who holds on to them after me holds on to the rope of God; and whoever abandons them has abandoned God." 
There are numerous hadith-reports of this kind in the sources which one can undertake to examine.
The Sunni hadith on the Subject of the Mahdi
Dr. Fahimi: Mr. Hoshyar! Our friends know it. But let me tell you that I follow the Sunni school of thought. Hence the positive evaluation that you have of the Shi'i hadith-reports I do not share. In all likelihood extremist Shi'is for whatever reasons after having accepted the narratives about the Mahdiism must have fabricated traditions in support of their views and ascribed them to the Prophet. The evidence for my contention is that the traditions about the Mahdi are recorded only in your Shi'i books. There is no trace of these in our authentic --Sihah-- compilations. Yes I am aware that there are some traditions on the subject in our less reliable compilations.
Mr. Hoshyar: In spite of the most unfavorable conditions under the Umayyads and the 'Abbasids whose politics and oppressive governments did not allow the discussion or the spread of hadith about Wilayat and Imamat and the ahl al-bayt or their being recorded in the books of the hadith your compilations of hadith are not completely void of any traditions on the subject of the Mahdi. If you are not tired I may cite some of them for you.
Engineer Madani: Mr. Hoshyar! Please continue your conversation.
Mr. Hoshyar: Dr. Fahimi! In your compilations the Sihah there are chapters devoted to the subject of the Mahdi in which traditions from the Prophet have been recorded. For example the following:
'Abd Allah reports from the Prophet who said: "The world will not come to pass until a man from among my family whose name will be my name rules over the Arabs."
Tirmidhi has recorded this hadith in his Sahih  and comments: "This hadith on the Mahdi is reliable and has been related by 'Ali b. Abi Talib Abu Sa'id Umm Salma and Abu Hurayra":
'Ali b. Abi Talib has narrated from the Prophet who said: "Even if there remains only a day on earth God will bring forth a man from my progeny so that he will fill the earth with justice and equity as it is filled with tyranny."
In another hadith Umm Salma narrates that she heard the Prophet say: "The promised Mahdi will be among my progeny among the descendants of Fatima."
Abu Sa'id al-Khudari says: The Prophet said: "Our Mahdi will have a broad forehead and a pointed nose. He will fill the earth with justice as it is filled with injustice and tyranny. He will rule for seven years." 
'Ali b. Abi Talib has related a tradition from the Prophet who informed him:
The promised Mahdi will be among my family. God will make the provisions for his emergence within a single night. 
Abu Sa'id al-Khudari has related a tradition from the Prophet who declared:
The earth will be filled with injustice and corruption. At that time a man from among my progeny will rise and will rule for seven or nine years and will fill the earth with justice and equity.
Greater detail is provided in another hadith reported by Abu Sa'id al-Khudari. In this tradition the Prophet said:
Severe calamity from the direction of their ruler will befall my people during the Last Days. It will be a calamity which in severity shall be unprecedented. It will be so violent that the earth with injustice and corruption will shrivel for its inhabitants. The believers will not find refuge from oppression. At that time God will send a man from my family to fill the earth with justice and equity just as it is filled with injustice and tyranny. The dwellers of the heavens and the earth will be pleased with him. The earth will bring forth all that grows for him and the heavens will pour down rains in abundance. He will live among the people for seven or nine years. From all the good that God will bestow on the inhabitants of the earth the dead will wish to come to life again."
There are numerous traditions that convey these meanings in your books. I believe we have cited enough reports to make our point.
The Objection Raised by One of the Authors:
Dr. Fahimi: The author of the book entitled: Al-Mahdiyya fi al-islam writes:
Muhammad b. Isma'il Bukhari and Muslim b. Hajjaj Nishaburi the compilers of the two most authentic books of the Sunni hadith who recorded these traditions meticulously and with extreme caution in verifying their reliability have not included traditions about the Mahdi in their Sihah. Rather these traditions are part of the compilations of Sunan of Abu Dawud Ibn Majah Tirmidhi Nasa'i and Musnad of Ahmad b. Hanbal. These compilers were not careful in selecting traditions and their hadith-reports were regarded by scholars like Ibn Khaldun as weak and unacceptable.
Ibn Khaldun and the Traditions about the Mahdi:
Mr. Hoshyar:To elaborate on the topic of the reliability of the hadith on the Mahdi let us cite Ibn Khaldun's opinion on the matter in full:
It has been well known (and generally accepted) by all Muslims in every epoch that at the end of time a man from the family (of the Prophet) will without fail make his appearance strengthen Islam and make justice triumph. Muslims will follow him and he will gain domination over the Muslim realm. He will be called the Mahdi....Such traditions have been found among the traditions that religious leaders have published. They have been critically discussed by those who disapprove of them and have been often refuted by means of certain traditions.
This was the summary of the opinions held by Ibn Khaldun. He then proceeds to mention the transmitters of these hadith and critically evaluate their reliability or lack thereof as held by the scholars of transmitted sciences. Let us respond to some points raised by Ibn Khaldun:
1. Uninterrupted Transmission (tawatur) of the Traditions
Numerous Sunni scholars have recognized the traditions about the Mahdi to have been uninterruptedly transmitted. They have in fact transmitted them uninterruptedly from other sources without raising objections to them. Among these scholars are Ibn Hajar Haythami in al-Sawa'iq al-muharriqa; Shablanji in Nur al-absar; Ibn Sabbagh in al-Fusul al-muhimma; Muhammad al-Saban in As'af al-raghibin; Kanji Shafi'i in al-Bayan; and so on. Such an uninterrupted transmission of these traditions compensates for the weakness found in their chain of transmission. According to 'Asqalani a tradition that is reported in every generation uninterruptedly leads to establish its veracity and an action taken based upon it is not subject to dispute.
A similar opinion is held by Sayyid Ahmad Shaykh al-Islam and the Shafi'ite Mufti who writes that the traditions about the Mahdi are numerous and mutawatir. Among these some are 'sound' (sahih) others are 'good' (hasan) and still others are 'weak' (da'if). However he says the majority are weak traditions and since they are numerous and their reporters are also in large number some go towards strengthening the others and lead to their acceptance as reliable.
Among those who narrate the hadith about the Mahdi are a group of prominent companions of the Prophet. These include: 'Abd al-Rahman b. 'Awf Abu Sa'id al-Khudari Qays b. Jabir Ibn 'Abbas Jabir Ibn Mas'ud 'Ali b. Abi Talib Abu Hurayra Thawban Salman Farisi Hudhayfa Anas b. Malik Umm Salma and others. Among the Sunni authors who have included these traditions in their books
are: Abu Dawud Ahmad b. Hanbal Tirmidhi Ibn Majah Nasa'i Tabrani Abu Nu'aym Isfahani and numerous other compilers of the hadith.
2. Weak Transmission Is Not an Issue in All Places:
It is important to state that most of the persons who are recognized as being weak in their transmission and are mentioned by Ibn Khaldun have also been accredited by others. In fact even Ibn Khaldun mentions some of them. Moreover the weakening of the transmission of a hadith does not have absolute preponderance over its being approved as reliable because special characterization is a subjective matter. Whereas a certain characteristic of a tradition might render it a weak tradition in accord with one researcher another investigator might find quite the opposite. Hence the opinion of the former can be accepted only if the reason for rendering a tradition weak is made clear.
In his Lisan al-mizan 'Asqalani says: The weakening of the tradition assumes preponderance over its accreditation when the reason for doing so is made explicit. Otherwise the opinion of the person rendering the tradition weak has no value.
Abu Bakr Ahmad b. 'Ali al-Baghdadi writes: It must be pointed out that as for the traditions accepted and used as evidence by Bukhari Muslim and Abu Dawud although some of their transmitters have been criticized and have been declared unreliable the reason for their criticism and unreliability has not been well established and proven by them. Moreover he says if weakness and reliability of a tradition are of equal weight then its weakening is preponderant.
However if weakness is less obvious than reliability then there could be varying opinions about that tradition. The best way to resolve this problem of authenticating a tradition is to say that if the reason for weakness is mentioned and if that reason is convincing then weakness has preponderance over reliability. But if the reason is not mentioned then reliability has preponderance over weakness. 
To be sure we can not generalize and state with absolute certainty that in all places of dispute over the reliability of a tradition its being regarded as weak has preponderance over its being considered as reliable. If all points of weakness are made effective then there would be very few traditions that would be spared from criticism. It is therefore important that in such cases careful analysis and rational evaluation are carried out to clarify the truth.
3. Unreliable Simply Because of Being Shi'i
Often a tradition is deemed weak because its transmitter is a Shi'i. For example Ibn Khaldun rejected Qutn b. Khalifa one of the transmitters of the Mahdi traditions because he was a Shi'i. In this connection he quotes 'Ijli saying that Qutn was good in hadith but he was somewhat inclined towards Shi'ism. Again according to Ahmad b. 'Abd Allah b. Yunus and Abu Bakr b. 'Ayyash Qutn was unreliable and his traditions were rejected because of his 'corrupt' beliefs. On the other hand there were others like Ahmad b. Hanbal Nasa'i and so on who accredited him and regarded his traditions reliable.
Another transmitter by the name of Harun was also regarded as weak because as Ibn Khaldun tells us he and his sons were Shi'ites. Some hadith scholars regarded Yazid b. Abu Ziyad a weak transmitter because "he was the leader of the Shi'is" and that he was among the Shi'is of Kufa. Commenting on 'Ammar al-Dhahabi Ibn Khaldun tells us that although prominent traditionists like Ahmad b. Hanbal Nasa'i and others had regarded him reliable Bishr b. Marwan because of his Shi'ism considered him weak. Also 'Abd al-Razzaq b. Humam's traditions were regarded as weak because he narrated traditions relating the merits of the family of the Prophet and was famous for his Shi'ism. 
4. Difference of Creed
Another excuse used to discredit traditions reported by some pious and truthful individuals was the difference in creed. For example one of the sensitive issues that generated lots of debate and led to an inquisition at that time was that of the createdness of the Qur'an. There were some in the community who believed that the Qur'an was not created in time and hence was eternal. Others believed that it had appeared at some point in time and hence was created. These two groups were engaged in not only heated arguments but also mutual condemnation. A number of the narrators of the hadith believed that the Qur'an was either created in time or that indicated that they had doubts about the issue. These narrators were discredited and condemned.
The author of Adwa' 'ala al-sunna al-muhammadiya writes:
The scholars had condemned a group of narrators like Ibn Lahi'a as unbelievers. Their sin was their belief that the Qur'an was created. Moreover it is said that Muhasibi did not accept the inheritance from his father because he said: "Those who are dualists do not inherit from each other. I do not want my share of inheritance from my father." The reason for his refusal was that his father was a waqifi that is he was doubtful in expressing his opinion whether the Qur'an was created or not. s
Just as extreme religious prejudices and differences became the cause for overlooking the trustworthiness and truthfulness of the narrators (thereby rejecting what they reported) shared belief on a matter and belonging to the same school of thought generated unwarranted trust of the narrators whose unreliability and corrupt character were overlooked. The situation was so critical that instead of verifying the credibility of the narrator they actually accredited them. Thus for example according to 'Ijli 'Umar b. Sa'd was among the reliable transmitters of the second generation of the companions of the Prophet whose traditions people had recorded.
This evaluation is contrary to the generally held fact that he was responsible for the murder of Imam Husayn (peace be upon him) whom the Prophet had declared the chief of the youth in Paradise and his beloved grandson.
Such was the case with Bisr b. Artat who received an official assignment from Mu'awiya. He had massacred thousands of innocent Shi'is and used to publicly curse 'Ali b. Abi Talib the Prophet's caliph. However such a person of low character has been excused for these heinous deeds and has been regarded as an independent and learned authority in jurisprudence.
Regarding 'Utba b. Sa'id Yahya b. Mu'in writes:
He is reliable. Nasa'i Abu Dawud and Daraqutni have also regarded him trustworthy. On the other hand 'Utba b. Sa'id was a companion of the wicked Hajjaj b. Yusuf.
It is not difficult to see the double standards that were applied in accreditation of the traditions reported by individuals whom they favored. Bukhari accepted the traditions reported from Marwan b. Hakam in his Sahih and relied upon them. And yet Marwan was one of the major causes of the Battle of the Camel having encouraged and instigated Talha to fight against 'Ali. Then during the battle the same Marwan killed Talha.
The author of Kitab adwa' draws our attention to the fact that careful analysis of what these scholars did to authenticate Marwan clearly shows an endeavor to promote a wicked person like Marwan who favored killing 'Ali actually killed Talha and was responsible for the murder of Husayn b. 'Ali. On the other hand hadith compilers like Bukhari and Muslim discredited prominent scholars and memorizers of the Prophetic traditions like Hammad b. Maslama and the pious and god-fearing Makhul simply because of their disagreement on some issues related to the creed.
All in all if any person narrated traditions in praise of the
family of the Prophet and 'Ali b. Abi Talib or related traditions agreeing with the Shi'i beliefs some staunchly Sunni scholars suspected their hadith reports to be unreliable or declared them unconvincing. If this was the treatment of those suspected of Shi'i leanings then hadith reported by those whose Shi'ism was public knowledge received even more blunt treatment. Their traditions were rejected outright.
One need only read Tabari's books to fathom the prejudicial treatment given to the narrators whose beliefs were contrary to the mainstream Sunni faith. According to Muslim the compiler of the Sahih Muslim Tabari says: "I met Jabir Ju'fi. But I did not record any tradition from him because he believed in raj'a (return of the dead before the emergence of the Mahdi)."
5. Unfounded Prejudice
It is obvious that to pursue an agenda and to follow prejudice is not conducive to objective research. Anyone who intends to do research about a subject and to get to the truth of a matter must discard his unfounded prejudices against and hatred towards it and then begin his investigation. When during the process of the investigation a piece of evidence is found in a tradition one should investigate its narrator in order to prove his reliability. If the narrator's reliability is confirmed then his tradition should be accepted regardless of whether he is a Sunni or a Shi'i. It is against the rule of fairness and the method of investigation that the traditions of a reliable narrator be rejected simply because he happens to be a Shi'i or is accused of being one. In fact fair minded scholars among the Sunnis have been aware of this prejudice.
In this connection 'Asqalani comments:
One of the instances when one should pause in accepting the opinion of the person who is engaged in discrediting a narrator is to investigate whether there exists a difference in the matter of creed between the person who is engaged in discrediting and the narrator who is being discredited. For example Abu Ishaq Jawzjani was a Sunni who hated the ahl al-bayt (a nasibi) while the people of Kufa were famous for their Shi'ism.
Hence he discredited the Kufan narrators in the most severe terms. Accordingly people like A'mash Abu Nu'aym and 'Abd Allah b. Musa although the leaders and pillars of narrators of hadith were declared unreliable by him. Qushayri says: "The motives of the people resemble the pits of fire." Consequently in such instances a statement about the narrator's reliability has preponderance over a statement about his unreliability.
Similarly Muhammad b. Ahmad b. 'Uthman Dhahabi following his account about Aban b. Taghlib's life writes:
If some one objects to why we declare him trustworthy in spite of the fact that Aban was among the people of innovation (i.e. Shi'is) I say thus: Innovation is of two kinds. One is a lesser type like the extremism in Shi'ism or Shi'ism without extremism and sinful deviation. This kind of innovation was common among a number from the second and third generation of the companions of the Prophet in spite of the fact that their piety and moral probity were beyond reproach. If it is decided that the traditions reported by such narrators should be rejected a large number of Prophetic traditions would necessarily have to be rejected. The wrongness of such an opinion is self-evident. The second type of innovation is of a greater type such as the complete rejection [of the first three caliphs] and the cursing of Abu Bakr and 'Umar. Indisputably the traditions reported by this group have no value and should be rejected.
In short anyone who undertakes research and wants to discover truth should not accept such statements of the unreliability of a narrator at face value. Rather he should try to uncover the reason for discrediting a narrator and whether that person truly deserves such a judgement.
6.Sahih Muslim and Sahih Bukhari and Traditions about the Mahdi
It is important to emphasize that if the traditions about the Mahdi were not recorded by Bukhari and Muslim this does not mean that the reports were weak in transmission. After all these two compilers had no intention of shedding light on all the traditions. According to Bayhaqi Muslim and Bukhari did not intend to search for all the traditions. The evidence is provided by the inclusion of numerous traditions that were recorded by Bukhari and which are not part of Muslim's collection. At the same time there are traditions in the Sahih of Muslim which were avoided by Bukhari.
Just as Muslim claimed to have recorded only the authentic traditions in his compilation so did Abu Dawud in his collection. This latter fact has been observed by Abu Bakr b. Dasa who heard Abu Dawud say: "I have recorded 4 800 traditions in my collection of which all are either reliable or close to reliable." In addition Abu al-Sabah confirms that it was reported to him that Abu Dawud made a similar claim about the traditions in his compilation Sunan adding that if he included a weak tradition he made that clear. "Hence any tradition about which I have not made any comment should be regarded as reliable." A similar positive opinion about Abu Dawud's Sunan has been related from Khatabi in the introduction to the present edition by Sa'ati.
In short the traditions in Muslim and Bukhari are not different in reliability from the traditions recorded by other authors of the Sahih. What is important is that their transmitters should be investigated in order to establish their credibility or the lack thereof.
To be sure the Sahihs of Muslim and Bukhari whose authority is accepted by all the Sunnis are not completely devoid of traditions about the Mahdi although the term mahdi has not been used to express this belief among Muslims. Following is one such hadith:
It is reported from Abu Hurayra that the Prophet said: "What will be your reaction when the son of Mary descends and your Imam is among yourselves?" 
There are a number of other traditions on a similar theme in these two compilations. It is also important to bear in mind that Ibn Khaldun has neither totally falsified all the traditions about the Mahdi nor has he claimed that he does not accept them. The context of Ibn Khaldun's remark about these traditions is provided by his opening statement in this section when he says:
It has been well known (and generally accepted) by all Muslims in every epoch that at the end of time a man from the family (of the Prophet) will without fail make his appearance who will strengthen Islam and make justice triumph. Muslims will follow him and he will gain domination over the Muslim realm. He will be called the Mahdi.
It is evident that he has briefly accepted the fact that the belief in the awaited Mahdi is common among Muslims. Moreover after his critical evaluation of the traditions and their transmitters he concludes the discussion with the following observation:
This is the situation of the traditions about the awaited Mahdi. It has been seen in the books that with the exception of very few most of these traditions are regarded as unreliable.
Hence even at this point he has not rejected all the traditions on the subject. Rather as he confesses some of them are authentic.
Furthermore it is relevant to point out that the traditions on the subject of the Mahdi are not confined only to those mentioned and critically evaluated by Ibn Khaldun. Quite to the contrary most of the books on hadith both by the Sunnis and the Shi'ites narrate traditions in an unbroken chain of transmission which actually comes close to their verification as being credible. Had Ibn Khaldun known about the existence of all these traditions he would have probably regarded the belief in the Mahdi as deeply rooted in the Islamic revelation.
To conclude this discussion we can say that it is incorrect to maintain as some scholars do that Ibn Khaldun rejected the tradition about the Mahdi. On the contrary it is these authors who have read into Ibn Khaldun such an opinion.
Other Opinions from Ibn Khaldun:
Ibn Khaldun concludes this section on the traditions concerning the Mahdi thus:
The truth one must know is that no religious or political power's propaganda can be successful unless power or group feeling exists to support the religious and political aspirations and to defend them against those who reject them and until God's will concerning them materializes. We have established this before with rational arguments which we presented to the reader. The group feeling among the Fatimids and Talibids indeed that among all the Quraysh has everywhere disappeared. The only exception is a remnant of the Talibids -- Hasanids Husaynids and Ja'farites -- in the Hejaz in Mecca al-Yanbu' and Medina.
They are spread over these regions and dominate them.
They are Bedouin groups. They are settled and rule in different places and hold divergent opinions. They number several thousands. If it is correct that a Mahdi is to appear there is only one way for his propaganda to make its appearance. He must be one of them and God must unite them in the intention to follow him until he gathers enough strength and group feeling to gain success for his cause and to move people to support him. Any other way -- such as a Fatimid who would make propaganda for (the cause of the Mahdi) among people anywhere at all without the support of group feeling and
power by merely relying on his relationship to the family of Muhammad (peace be upon him) -- will not be feasible or successful for the sound reasons that we have mentioned previously.
In response to this assertion by Ibn Khaldun it must be pointed out that there is no doubt that anyone who wishes to revolt and gain power so as to establish a government must have the unquestioning support of his followers in order to reach that goal. Similar conditions must be fulfilled in the case of the awaited Mahdi and his universal revolution. However it is not necessary to require that his supporters be among the descendants of 'Ali and the Quraysh. The reason is that if the government and leadership is based on ethnic and group feeling then the support has to come from that feeling.
Moreover these should be the ones to support him unquestioningly. This was certainly true in the case of ethnic groups and dynasties that came to power by means of this sense of loyalty and solidarity. In general a government that comes to power through the specific and limited sense of group feeling is necessarily dependent upon a specific and limited group of supporters. This is true in all such cases of nationalistic ethnic and ideological states.
However if a government is founded upon a specific program then it has to gain support of those who favor it. And this order can succeed only if a group recognizes the value of the program and desires to implement it by supporting the leadership that is committed to it. The revolutionary program of the Mahdi is of this kind. The Mahdi's program is profoundly universal. It desires that humanity which is being driven into extreme forms of materialism and opposition to divine commands respond to the divinely ordained system which rests upon moral and spiritual goals.
It wishes to resolve the problems facing humanity by clarifying the boundaries in such a way as to remove any cause of conflict in society. It wants to bring people together under the banner of the Unity of God and universalize submission and service to God. Such a program if implemented would end tyranny and injustice and spread peace through justice all over the world.
In order to achieve this universal goal it is not sufficient to rely on the leadership of the descendants of 'Ali who are spread all over the Hejaz and to expect that the group feeling would help the Mahdi to reach his universal goal. To be sure there is a need for the peoples of the entire world to prepare themselves to respond to the call of the Mahdi. Besides the divine endorsement of this program the Mahdi's victory is dependant upon a reasonably large and earnest group of people who being aware of the merits of the divinely ordained system would seriously aspire to see such an order implemented.
Moreover they would be willing to sacrifice their lives for that cause. Consequently if the people see an infallible and incontestable leader who has access to the divine plan for humanity and has divine endorsement of his program they would not hesitate to assist him in establishing the ideal public order even if this means that they would have to sacrifice their lives.
The Existence of the Mahdi is Certain
There are numerous Prophetic traditions about the Mahdi reported by both the Sunni and the Shi'i sources. Close examination of the contents of these traditions proves that the subject of the future coming of the Mahdi and the Qa'im was a well established tenet during the Prophet's life time. People anticipated someone who would take upon himself to establish truth and spread the worship of God. Moreover they expected that person to take charge of purifying the earth and instituting justice. The belief was so wide spread among the people that having verified it in principle they were engaged in discussing its details.
Sometimes they would ask: "From which family would the awaited Mahdi arise?" At other times they wanted to know his name and patronymic. Still at other times they wanted to know the reason why he was called the Mahdi. They wanted to know about his revolution and asked about the signs of his appearance. They also wanted to find out if the Mahdi and the Qa'im were one and the same person. They were told about the Mahdi's occultation and wanted to understand the reasons and the obligations of his followers while he was in occultation. The Prophet also from time to time used to inform people about the existence of the Mahdi. He would inform them saying: "Mahdi will be among my descendants. He will be among the sons of Fatima among the descendants of Husayn." At other times he would announce his name and patronymic and give information about the signs of his reappearance and other related matters.
The Discussion among the Companions and the Subsequent Generations:
After the Prophet's death the story of the coming of the Mahdi was often heard among the prominent companions of the Prophet and the following generation. The matter was regarded among the religious truths and was treated as one of the certain future events. The following are some examples of this in the sources:
Abu Hurayra says: "People will pay allegiance to the Mahdi between rukn and maqam." Ibn 'Abbas is reported to have told Mu'awiya that a person among the descendants of the Prophet will rule for forty years at the End of Time. On another occasion a man asked Ibn 'Abbas to inform him about the Mahdi. He said: "I hope that in the near future a young man from our family (the Hashimite) will arise to put an end to civil strife and sedition." Ibn 'Abbas also specified the descendant of the Prophet as being from the children of Fatima. According to another famous companion of the Prophet 'Ammar Yasir: "At the time when Nafs al-Zakiyya is killed a caller from the heaven will say: 'Your commander is so-and-so.' Following it the Mahdi will emerge and fill the earth with justice and equity."
'Abd Allah b. 'Umar mentioned the name of Mahdi in the presence of an Arab who said: Mahdi is Mu'awiya b. Abu Sufyan. 'Abd Allah said: "It is not as you say. Mahdi is a person behind whom Jesus will offer his prayers."
'Umar b. Qays asked Mujahid if he knew anything about the Mahdi since he did not believe in what the Shi'a were saying about him. Mujahid said: "Yes I do. One of the Prophet's companions told me that the Mahdi will not appear until that time when Nafs al-Zakiyya will be killed. At that time he will take the command and will fill the earth with justice and equity."
Nufayl's daughter 'Umayra narrates that she heard Hasan b. 'Ali's daughter saying: "This affair about which you are waiting will not occur until among you some seek to distance themselves from the others and curse each other."
The author of Maqatil al-talibiyin Abu al-Faraj Isfahani writes that Fatima Husayn b. 'Ali's daughter used to engage in midwifery as a voluntary service to the women of Banu Hashim. Her son used to object to her saying: "We are afraid that you will be recognized as a professional midwife." In reply she would say: "I am awaiting someone. As soon as he is born I will stop assisting in delivery."
Qatada asked Ibn Musayyib: "Is the existence of Mahdi a truth?" He said: "Yes. He is a member of the Quraysh among the descendants of Fatima." A similar tradition is reported from the famous scholar Zuhri who also related that the Mahdi will be among the descendants of Fatima. Abu al-Faraj reports an event when Walid b. Muhammad was with Zuhri and a clamor transpired. Zuhri asked Walid to find out what had caused it. After finding out Walid reported: "Zayd b. 'Ali has been killed and his head has been brought." Zuhri was upset and said: "Why is this family in haste? Haste has destroyed a number of them." Walid asked: "Will they reach power?" He replied "Yes because 'Ali b. Husayn narrated to me on the authority of his father who heard this from Fatima the Prophet's daughter who in turn heard the Prophet tell her: 'Mahdi will be among your descendants.'"
In another place Abu al-Faraj reported a tradition from Muslim b. Qutayba who said: "One day I went to visit Mansur the 'Abbasid caliph. He said: 'Muhammad b. 'Abd Allah has revolted and has announced that he is the Mahdi. By God he is not the Mahdi. Let me tell you something. I have not told nor will I tell this to anyone else besides you. My son Mahdi is not the one mentioned in the traditions. I have just named him Mahdi as a good omen.'"
Other sources that mention these traditions include the following:
Ibn Sirin used to say that the promised Mahdi will be from this Umma. He will be the one who will lead Jesus in prayers.  In another place he reports a tradition from 'Abd Allah b. Harith. He said: "The Mahdi will arise at the age of forty and will resemble the Children of Israel." A variant of this tradition reported by Artat says that the Mahdi will arise at the age of twenty. Another tradition in the same section explains the reason Mahdi was named thus. Ka'b says: "He was named Mahdi because he will be guided to the hidden matters." 'Abd Allah b. Shurayk used to relate that the Prophet's standard will be with the Mahdi.
Ibn Sirin records several other traditions that speak about the function of the Mahdi. One of these reported from Hakam b. 'Uyayna says that the reporter asked Muhammad b. 'Ali al-Baqir:
We have heard that one among your ahl al-bayt will arise and will establish justice and equity. Is this true? He said: "We are also awaiting his appearance and living in hope."
In another tradition Salma b. Zafar reports:
One day people were talking about the appearance of the Mahdi in the presence of Hudhayfa. Hudhayfa said: "If Mahdi has indeed appeared while you are living close to the Prophet's period and while his companions are living among you then you are truly fortunate. However that is not the case. Mahdi will not appear until people are devoured by oppression and tyranny and there is no one absent more beloved and more needed than him."
People were so familiar with the characteristics of the Mahdi that Jarir the Arab poet read the following lines of his poem for the Umayyad caliph 'Umar b. 'Abd al-'Aziz in which he compares the caliph with the future Mahdi:
Your presence is a blessing. Your conduct is the conduct of the Mahdi. You are fighting your lower self and you spend the night in recitation of the Qur'an.
Muhammad b. Ja'far reports that he once told Malik b. Anas his misfortunes. He said: "Wait until the significance of the verse of the Qur'an: 'Yet We desired to be gracious to those that were abased in land and to make them leaders and to make them the inheritors (27:5) ' becomes materialized."
People Awaited the Appearance of the Mahdi
From all the references to the Mahdi and his appearance in the sources it is obvious that people were awaiting the coming of the Mahdi from the early days of Islam and were actually counting the days for that to happen. They regarded the establishment of the legitimate government through his emergence a certainty. This anticipation used to get intense during times of political turmoil and unfavorable social conditions. People expected that the emergence would take place imminently. On many occasions they would adhere to the false pretender or would regard some person to be truly the promised Mahdi. Those whom people thought were the promised Mahdi included the following:
(1) Muhammad b. Hanafiyya:
Since he had the name and patronymic of the Prophet there was a group that believed him to be the Mahdi. According to Tabari when Mukhtar b. Abu 'Ubayd Thaqafi wanted to revolt against the Umayyads and exact revenge from those who had murdered the grandson of the Prophet Husayn he ascribed Mahdiism to Muhammad b. Hanafiyya. And he claimed to be his envoy and his deputy and showed the letters he had brought with him to the people.
Ibn Sa'd tells us that when people wanted to greet Ibn Hanafiyya they would address him thus: "Peace be to you O Mahdi!" And he would reply: "Yes I am the Mahdi and I shall guide you towards the straight path and prosperity. My name is the same as the name of the Prophet and my patronymic is also his patronymic. Whenever you want to greet me say: 'Peace be to you O Muhammad; peace be to you O Abu al-Qasim!'"
This and other similar reports indicate that one of the signs of the appearance of the promised Mahdi was the combination of the Prophet's name and patronymic for a person. This is the reason Ibn Hanafiyya made a reference to this fact for himself. However careful investigation of historical sources reveals that it was not Ibn Hanafiyya who made such claims for himself. It was others like Mukhtar who introduced him thus. On his part sometimes Ibn Hanafiyya kept silent on the matter confirming the attribution to him. This policy was probably followed with the hope that the murderers of Karbala would be avenged and the Islamic leadership would revert to its rightful holder.
This is supported by another report in which Ibn Hanafiyya tells the people: "Be aware that the rightful people have a government which will be established when God desires it. Anyone who witnesses it will be fortunate and anyone who predeceases it will enjoy the blessings of God in the hereafter."
Muhammad b. Hanafiyya in a sermon that he delivered in the presence of some seven thousand people said: "You have hastened in this matter. Yet among your descendants are people who with the help of the family of the Prophet will wage war against the enemies of God. The government of the family of the Prophet is not concealed from anyone. However its materialization will take time. I declare solemnly in the name of the One in whose hand is Muhammad's life the rule will return to the Prophet's family."
(2) Muhammad b. 'Abd Allah b. Hasan:
This was another descendant of the Prophet whom people accepted as the Mahdi. According to Abu al-Faraj when Muhammad b. 'Abd Allah was born the family of the Prophet rejoiced and quoted the Prophet saying: "The name of the Mahdi is Muhammad." As such they were hopeful that Muhammad would be the promised Mahdi. They used to adore him. In the gatherings he was mentioned frequently and the Shi'is used to give each other good news about his impending appearance.
In another place Abu al-Faraj reports an account which says that when Muhammad b. 'Abd Allah was born he was named Mahdi with the expectation that he was the Mahdi promised in the earlier sources. However the leaders of the Talibids used to call him nafs al-zakiyya and in accord with the divine decree he would be killed in Ihjar Zayt. One of the slaves of Abu Ja'far Mansür relates that he was told by Mansur to go and sit near the pulpit and listen to his lectures. Once he heard him say: "Do not entertain any doubt that I am the Mahdi and the reality is also thus." The slave reported the incident to the Caliph who said: "By God Muhammad is telling falsehood. The truth is that the promised Mahdi is my son." 
Salma b. Aslam composed lines about Muhammad b. 'Abd Allah in which he said: "That which is reported in the traditions will materialize when Muhammad b. 'Abd Allah appears among the people and takes charge of the affairs with his hands. Muhammad has a special ring which God has not given to anyone except him. There will be signs of piety and goodness in him. We hope that Muhammad will be the Imam through whose blessed existence the Qur'an will come to life again. Moreover through his existence Islam will be revived and reformed and the poor orphan children and needy families will again live in prosperity. He will fill the earth with justice and equity as it is filled with corruption. And our hopes and aspirations will be fulfilled."
The Jurists of Medina and the Mahdi Traditions:
When Muhammad b. 'Abd Allah revolted one of the jurists of Medina by the name of Muhammad b. 'Ajlan also rose with him.
After he was killed Ja'far b. Sulayman the governor of Medina summoned Muhammad b. 'Ajlan and asked him: "Why did you rise with that liar?" He then ordered his hands to be cut. Other jurists who were present in the court at that time interceded on his behalf emphasizing that Muhammad b. 'Ajlan was a pious jurist of Medina and had erroneously regarded Muhammad b. 'Abd Allah as the Mahdi promised in the traditions.
Another well-known jurist and a prominent scholar of the hadith 'Abd Allah b. Ja'far also rose with Muhammad b. 'Abd Allah. When the latter was killed he fled from Medina and remained in hiding until he was granted amnesty. One day the governor of Medina passed by him and asked him the reason why he arose with Muhammad b. 'Abd Allah in spite of his learning in the law and traditions. He replied: "The reason I supported and cooperated with him was that I was confident that he was the promised Mahdi about whom we have been informed in the traditions. I did not doubt Muhammad's Mahdiism until I saw him killed. At that time I knew he was not the Mahdi. I will not fall into anyone else's hoax from now on."
From such accounts it is evident that the subject of the Mahdiism was widespread from those early days of Islam close to the period of the Prophet. It was accepted as an absolute religious truth and people were awaiting the Mahdi. It was for this reason that the common people who knew little about the signs for the appearance of the Mahdi and who were downtrodden believed that Muhammad b. Hanafiyya and Muhammad b. 'Abd Allah and other pretenders were the promised Mahdi. However the scholars and those who were well informed about the ahl al-bayt including Muhammad's own father knew that he was not the promised Mahdi.
A man came to see 'Abd Allah b. Hasan and asked him when his son Muhammad would rise. He replied: "As long as I have not been killed he will not rise." The man sighed and said: "From God we originate and to God we shall return. If Muhammad is killed the umma will collapse." 'Abd Allah said to him: "That is not the case." The man continued and asked when would Ibrahim rise. He said:
"As long as I am not destroyed he will not rise. He too will be killed." Once again the man uttered the same verse and declared that the community had indeed undertaken the path of destruction. 'Abd Allah replied: "That is not so. Actually their master the promised Mahdi is twenty five years old. And at the time that he rises he will kill all the enemies." When Marwan was told that Muhammad b. 'Abd Allah had revolted he said: "Neither he nor any other person sharing his father's genealogy is the promised Mahdi. Rather he will be the son of a slave girl." Whenever the Imam Ja'far Sadiq would see Muhammad b. 'Abd Allah he would cry and say: "May my life be a sacrifice for him. People are speculating that he is the promised Mahdi. On the contrary he will be killed. Indeed his name is not mentioned among the caliphs of this community in the book of 'Ali."
A group of people were sitting around Muhammad b. 'Abd Allah when the Imam Sadiq entered the place. Everyone stood up in respect. He inquired about the affairs and they replied that they had decided to pay allegiance to Muhammad who was the Mahdi. The Imam said: "I advise you to desist from doing so because the time for the rise of the Mahdi has not approached yet. Moreover Muhammad is not the Mahdi."
The Poetry of Di'bil and the Mahdi:
When Di'bil b. 'Ali al-Khuza'i presented his famous lines in the presence of Imam Rida he ended his poem with the following lines:
No doubt an Imam will rise -- an Imam who will govern according to the name of God and the [divine] blessing.
These lines underscore the certainty with which Di'bil mentioned the rising of the Imam who will rule in the name of God and with God's blessings. On hearing this Imam Rida wept and said: "The blessed angel has put these words in your mouth. Do you know
this Imam?" Di'bil said: "No. But I have heard that an Imam among you will rise and will fill the earth with justice and equity." Imam Rida said: "After me my son Muhammad will be the Imam; following him his son 'Ali will be the Imam; and after 'Ali his son Hasan will be the Imam. Following Hasan his son will the Proof of God and the Qa'im who should be awaited while he is in occultation. And when he appears he should be obeyed. He is the one who will fill this earth with justice and equity. But the time of his emergence has not been fixed. However it has been reported by my ancestors that he would appear all of a sudden and in a flash of a moment."
There are numerous such reports in the historical sources which if you wish you can investigate.
It was quite late at night and the meeting was adjourned. It was decided that the group would meet the following Friday afternoon.
(1). The hadith is reported in the majority of the Sunni sources. However here we cite Majlisi Bihar al-anwar Vol. 51 p. 75 who has actually compiled these reports from all the sources in one place making it convenient to refer to them. Se also Ithbat al-hudat Vol. 1 p. 9.
(2). Bihar al-anwar Vol. 51 p. 74
(3). Bihar al-anwar Vol. 51 p. 65; Ithbat al-hudat Vol. 6 p. 382
(4). Bihar al-anwar Vol. 51 p. 73.
(5). Ibid. Vol. 51 p. 66.
(6). Ibid. Vol. 51 p. 84; Ithbat al-hudat Vol. 7 p. 191; Majma' al-zawa'id by 'Ali b. Abi Bakr Haythami (Cairo edition) Vol. 7 p. 317.
(7). Bihar al-anwar Vol. 51 p. 74; Ithbat al-hudat Vol. 7 p. 9.
(8). Bihar al-anwar Vol. 51 p. 75.
(9). Bihar al-anwar Vol. 51 p. 73.
(10). Ithbat al-hudat Vol. 2 p. 531.
(11). Ibid. p. 533.
(12). Ibid. p. 526.
(13). Hasan Sa'd Muhammad al-Mahdiyya fi al-islam (Cairo 1373) p. 69; Ibn Khaldun al-Muqaddima (Cairo edition) p. 311.
(14). Sahih Vol. 9 p. 74; also see: Shaykh Sulayman Yanabi' al-mawadda (1308 AH edition) Vol. 2 p. 180; Muhammad b. Yusuf al-Shafi'i al-Bayan fi akhbar sahib al-zaman (Najaf edition) p. 57; and other Sunni sources.
(15). Abu Dawud Sahih Vol. 5/207; see also all the sources mentioned in note s 2. In addition see: Shablanji Nur al-absar p. 156; Ibn Hajar al-Sawa'iq al-muharriqah p. 161; Ibn Sabbagh Fusul al-muhimma p. 275; al-Saban As'af al-raghibin.
(16). Abu Dawud Sahih Vol. 2 p. 207; Ibn Majah Sahih Vol. 2 p. 519 and the sources mentioned in note s 3.
(17). Abu Dawud Sahih Vol. 2 p. 208; Fusul al-muhimma p. 275; and numerous other Sunni sources.
(18). Ibn Majah Sahih Vol. 2 p. 519. Also Ibn Hajar al-Sawa'iq al-muharriqa p. 161.
(19). Ahmad b. Hanbal Musnad Vol. 3 p. 27.
(20). Ibn Hajar al-Sawa'iq al-muharriqa p. 161; Yanabi' al-mawadda Vol. 2 p. 177.
(21). al-Mahdiyya fi al-islam p. 69.
(22). Ibn Khaldun al-Muqaddimah p. 311.
(23). Ibn Hajar al-'Asqalani Nuzhat al-nazar p. 12.
(24). Futuhat al-islamiyya Mecca edition Vol. 2 p. 250.
(25). Ibn Hajar al-'Asqalani Lisan al-mizan Vol. 1 p. 25.
(26). Ibn Khaldun al-Muqaddimah p. 313.
(27). Ibid. p. 319.
(28). Abu Rayya Mahmud Kitab adwa' p. 316.
(29). Ibid. p. 319.
(30). Ibid. p. 321.
(31). Ibid. p. 317.
(32). Ibid. p. 319.
(33). Sahih muslim Vol. 1 p. 101.
(34). Lisan al-mizan Vol. 1 p. 16.
(35). Sahih muslim Vol. 1 p. 24.
(36). See the introduction to the Sunan abi Dawud by Sa'ati.
(37). Sahih muslim bab nuzul 'isa volume 2; Sahih bukhari kitab bad' al-khalq wa nuzul 'isa volume 4.
(38). Muqaddima p. 322.
(39). Muqaddima p. 327.
(40). Ibn Tawus Kitab al-malahim wa al-fitan p. 64. Rukn and maqam are two sacred spots in the grand mosque of Mecca.
(41). Ibid. p. 84.
(42). Ibid. p. 179.
(44). Ibid. p. 171.
(45). Majlisi Bihar al-anwar Vol. 52 p. 211.
(46). Maqatil al-talibiyin p. 160.
(47). Maqatil al-talibiyin p. 167.
(48). Kitab al-hawi li al-fatawa Vol. 2 p. 135.
(49). Ibid. p. 147-150.
(50). Ibid. p. 159.
(51). Ibn Qutayba al-Imama wa al-siyasa Vol. 2 p. 117.
(52). Maqatil al-talibiyin p. 359.
(53). Ta'rikh Vol. 4 pp. 449-494; Ibn Athir Kamil al-tawarikh Vol. 1 p. 339 358.
(54). Tabaqat al-kubra Vol. 5 p. 66.
(55). Ibid. Vol. 7 p. 71.
(56). Ibid. Vol. 5 p. 80.
(57). Ibid. pp. 165 and 157.
(58). Ibid. p. 163.
(59). Ibid. p. 193.
(60). Ibid. p. 195.
(61). Ibid. p. 143.
(62). Ibid. p. 141.
(63). Yanabi' al-mawadda Vol. 2 p. 197.