“Prophet Mohammed (PBUH & His Family) said to Ali (PBUH) on the night of his death, ‘O Father of Al-Hassan, bring me a pen and a paper,’ so the Messenger of Allah (PBUH & His Family) dictated his Will until he came to this position where he said: ‘O Ali, there will be twelve Imams after me and after them there will be twelve Mahdis. So you, O Ali, are the first of the twelve Imams, Allah the Exalted has named you in His heavens Ali Al-Murtada (the Content), Amirul Mo’mineen (the Prince of the Believers), Al-Siddiq Al-Akbar (the Greater Truthful), Al-Farouq Al-A’tham (the Greater Judge and Differentiator between truth and falsehood), Al-Ma’moun (the Trusted), and the Mahdi (the Guided). These names may not be attributed to other than you. O Ali, you are my vicegerent/guardian over my own family, their living and their dead, and upon my women: Whomever you kept, she shall find me tomorrow, and whomever you divorced, I am innocent of her, I will not see her and she will not see me on the Day of Resurrection. And you are my successor (Khalifa) over my nation after me. If death comes to you, hand it over to my son Al-Hassan, the righteous and benevolent. Then if death comes to him, let him hand it over to my son Al-Hussein, the martyr, the pure and murdered. If death comes to him, let him hand it over to his son, the master of worshipers, Dhul Thafanat (the one with hard skin on his knees) Ali. If death comes to him, let him hand it over to his son, Mohammed Al-Baqir (the Revealer of Knowledge). If death comes to him, let him hand it over to his son, Ja’far Al-Sadiq (the Truthful). If death comes to him, let him hand it over to his son, Musa Al-Kathim (the Patient). If death comes to him, let him hand it over to his son, Ali Al-Ridha (the Pleasing One). If death comes to him, let him hand it over to his son, Mohammed Al-Thiqa Al-Taqqi (the Trustworthy, the God-Fearing). If death comes to him, let him hand it over to his son, Ali Al-Nasih (the Advisor). If death comes to him, let him hand it over to his son, Al-Hassan Al-Fadhil (the Meritorious). If death comes to him, let him hand it over to his son, Mohammed the Safeguarded of the Family of Mohammed (PBUT). Those are the twelve Imams. Then there will be twelve Mahdis after him, so if death comes to him, let him hand it over to his son, the first of the close ones, he has three names, one like mine and my Father’s and it is Abdullah (Servant of God), Ahmed (the Praised), and the third name is Al-Mahdi (the Guided), and he is the first of the believers.’ ”
Arabic source:
- Ghaybat Al-Tusi, Al-Shaikh Al-Tusi, Vol. 1, p. 174
- Bihar Al-Anwar, Al-Allamah Al-Majlisi, Vol. 53, p. 148
English source:
https://thaqalayn.net/hadith/27/1/26/11