As research shows...
As research shows, you already know as to what Ibn-Abil Hadeed has narrated about the consensus of the Muslims on this fact and that is the duties shall not cease but with Mahdi. Thus he is the last of the legatees and the religion of Islam shall terminate in him just as his great grand father was the last of the Prophets and religion commenced from him.
Mahdi is the Twelfth Caliph The author of "Yanabi-ul-Muwadda" narrates (on page 447) from the book "Fara'ed-us-Semtain" which in turn narrates from Saeed-ibn-Jubair who narrates from Ibn-Abbass that the Holy Prophet (S.A.W.A.) said: - "Verily my Caliphs and successors after me are the Hujjats (Proofs) of Allah upon the people and they are twelve in number.
The first of them is Ali and the last of them is my son Mahdi." The author says: All those reasons and arguments which give indication to this fact that the Caliphs after the Holy Prophet (S.A.W.A.) are twelve in number and are all from Quraish or Bani-Hashim, give indication to the afore- mentioned matter too. All those reasons have been collected by Ahmad Hanbal in his book 'Musnad'. Besides him, other Sunni scholars and experts of traditions too have collected those reasoning.
The reasons which they have collected cannot be conformed but to what we, the Shia Ithna Ashar, say: The successors to the Holy Prophet (S.A.W.A.) are twelve in number where the first of them is Ali-ibn-Abi Talib, Amir-ul-Mumineen and the last of them is Muhammad-ibn-Hassan Mahdi (A.S.). May Allah place us amongst his followers and helpers?
Mahdi is the Twelfth 'Wasi' (Legatee) The author of "Yanabi-ul-Muwadda" narrates (on page 486) from 'Manaqib' of Khawrazmi who narrates from Ali-ibn-Musa ar-Ridha who narrates from his father and he from his father that the Holy Prophet (S.A.W.A.), while mentioning about his own virtue and his household and also something about his ascension (to heaven) said: "O my Lord, who are my legatees." Then a voice was heard, saying: 'Your legatees are those whose names have been written over the enclosure of My 'Arsh' (Throne).
Therefore, I looked and witnessed twelve lights on which was written the name of each of my legatees in green. The first of them was Ali and the last of Na'eem and on the afore-said page, narrated a tradition with similar contents from Tabarani. The author of Muruj-uz-Zahab in vol.