The Shi'ah, along with some Sunni scholars, believe that his father was Imam Al-'Askari (as) (d. 2260/874). There are approximately 31 Sunni scholars who confirm this reference, and the overwhelming majority of prophetic traditions about Al-Mahdi (as) state that the name of Al-Mahdi (as) is the same as the name of the Prophet Muhammad (saws). However, there exists a single Sunni report that has an additional phrase stating that his father's name is also similar to that of the Prophet's father (i.e. Abudllah). This extra phrase does not exist in any other Shi'ah and Sunni narrations (Ahadeeth). Moreover, the extra phrase in some Shi'ah ahadeeth is that his patronym is the same as the Prophet's (saws) patronym, Abu al-Qasim. This is the correct view. The single hadith in which we find the additional phrase -that his father's name is the same as the Prophet's father- was probably fabricated by Abdullah Ibn al-Hassan Muthanna, the second son of the Second Imam Hassan al-Mujtaba (as).
Abdullah (d.145/762) had a son named Muhammad and he called him "Nafs al-Zakiyyah" and Al-Mahdi.30 Abdullah concealed his son several times in the Umayyad period when there was still no danger for him. When he was asked why he did this, he said: "What an idea, his time had not come yet."31
The first time Muhammad wrote a letter to the Abbaid caliph, al-Mansur, he wrote: "From Muhammad Abdillah, Al-Mahdi..."32 Muhammad Ibn Abdillah started his claims at the end of the rule of the Umayyad caliphs, and became quite powerful. He tried to gain the support of the last Umayyad caliph, who was Marwan Ibn Muhammad (132/750), but the caliph did not pay any attention to him. Abu Abbas al-Falasti said to Marwan: "Muhammad Ibn Abdullah is striving to gain power, he is claiming to be Al-Mahdi." Marwan replied: "What does he have to do with me? The Mahdi is not him, nor any of his father's descendants. He will be the son of a slave woman." When Marwan said that Al-Mahdi is not one of "his father's descendants" he meant the descendants of Imam Hassan (as), for Al-Mahdi (as) is the descendants of Imam Husayn (as) and is the son of a slave woman. Even Marwan was aware of these traditions, and as such he did not pay any attention to Muhammad ibn Abdullah. This shows that true versions of narrations from the Prophet (saws) were widespread.
There is also a very small possibility that the fabrication of that extra phrase was done during the time of the Abbasid caliph, Abdullah al-Mansur, who called his son Al-Mahdi. Muslim Ibn Qutayba said: "Mansur called me and said: Muhammad Ibn Abdillah rebelled and he called himself Al-Mahdi. By Allah he is not. I will tell you something else, which I have told no one before you and will tell no one after you. By Allah my son is not Al-Mahdi either ... but I [named him] so that he might have a good future."
____________
30. Ibn Taqtuqa, p.165-166
31. al-Masudi 6: 107-108
32. Tabari 3:29, Ibn Kathir 10:85, Ibn Khaldun 4:4
Adapted from the book: "The Awaited Saviour; Questions and Answers"