Terms in the hadith of our Prophet (saas) about the End Times, such as "Hazrat Mahdi (as) will live 14 years," "Hazrat Mahdi (as) will have a life of 30 years" and "Hazrat Mahdi (as) will remain on Earth for 40 years ..." refers to various phases in Hazrat Mahdi’s (as) life, intellectual struggle and spiritual dominion based on the moral values of the Qur’an.
Much detailed information about Hazrat Mahdi (as) is provided in the hadiths and important stages in his life are suggested.
For example, the hadiths describe how Hazrat Mahdi (as) will be subjected to terrible oppression, assaults and slanders before he emerges openly. Times of imprisonment, detention and oppression will represent one very important stage in his life. Like Hazrat Mahdi (as), his followers will also be persecuted by the unbelievers of the time and be put through severe tests. The intellectual struggle of Hazrat Mahdi (as) and his followers against the unbelievers, the hypocrites of the End Times, various scholars of religious law and the antichrist of the End Times is another of these time frames. It is also revealed in the hadiths that the number of Hazrat Mahdi’s (as) followers will be 313. That number gives a good idea that it will take some time for that many people to gather around Hazrat Mahdi (as), to be educated and to grow in faith. All these developments show that there will be a long term between Hazrat Mahdi’s (as) appearance and assumption of spiritual sovereignty, and that there will be various phases within it.
These periods in Hazrat Mahdi’s (as) term of duty are narrated from our Prophet (saas) as follows:
The Messenger of Allah (saas) said: "Hazrat Mahdi (as) will emerge from my community, and HE WILL RULE FOR 5 OR 9 YEARS. A man will come to him and say: O Mahdi! Give me goods. And he will spread out his robe and fill it with as much as he can carry.” (Mar'i Ibn Yusuf Ibn Abi baqr Ibn Ahmet Ibn Yusuf al-Maqdi'si "Feraidu Fawaidi'l Fiqr Fi'l Imam Al-Mahdi Al-Muntazar”)
... He will divide goods and act according to the Sunnah of the Prophet, he will reveal Islam to neighboring countries and REMAIN FOR 7 YEARS, after which he will die and Muslims will perform his funeral prayer. (Ali Ibn Sultan Muhammad al-Qaari al-Harawi al-Hanafi, Risalat Mashrab al Vardi fi Mazhabi 'l Mahdi)
According to an account from Abu Abdullah Husayn Ibn Ali; Hazrat Mahdi (as) will rule for 19 YEARS. (Al-Uqayli, An-Najmu’s-saqib fi Bayan Anna’l Mahdi min Awladi Ali b. Abu Talib Ale't-Tamam ve'l Qamal)
According to al-Tabarani and Abu Nuaym's accounts from Abu Said Al-Khudri; the Messenger of Allah (saas) said: "A man will appear from my Ahl al-Bayt. He will speak of my Sunnah. Allah will send rain from the sky to serve him. The earth will give forth its bounty (by Allah’s command). He will fill a world that was previously full of oppression and injustice with truth and justice instead. HE WILL APPLY THAT SUNNAH FOR 7 YEARS.” (Mar'i Ibn Yusuf Ibn Abi baqr Ibn Ahmet Ibn Yusuf al-Maqdi'si "Feraidu Fawaidi'l Fiqr Fi'l Imam Al-Mahdi Al-Muntazar”)
According to an account from Hazrat Ali; Hazrat Mahdi (as) will eliminate all subsequent innovations from the faith and restore all the Sunnah. He will (spiritually) conquer Constantinople, China and Mount Daylam. HAZRAT MAHDI (AS) WILL REMAIN IN THIS STATE FOR 7 YEARS. Each year of his will be like 10 of yours. (Al-Uqayli, An-Najmu's-saqib fi Bayan Anna'l Mahdi min Awladi Ali b. Abu Talib Ale't-Tamam ve'l Qamal)
According to Al-Daraqutni and Tabarani's accounts from Abu Hurayra; the Messenger of Allah (saas) said: "Hazrat Mahdi (as) will be in my community. EVEN IF FOR AS LITTLE AS 7 OR 8, OR LESS THAN 9 YEARS, everyone in my community, sinner or non-sinner, will be blessed in a way never seen before...” (Mar'i Ibn Yusuf Ibn Abi baqr Ibn Ahmet Ibn Yusuf al-Maqdi'si “Feraidu Fawaidi'l Fiqr Fi'l Imam Al-Mahdi Al-Muntazar”)
According to Nuaym's account from Dhuhri; Hazrat Mahdi (as) will live for 14 YEARS, after which he will die normally. (Mar'i Ibn Yusuf Ibn Abi baqr Ibn Ahmet Ibn Yusuf al-Maqdi'si “Feraidu Fawaidi'l Fiqr Fi'l Imam Al-Mahdi Al-Muntazar”)
According to Nuaym's account from Bukya Ibn Walid; HAZRAT MAHDI’S (AS) LIFE IS 30 YEARS. (Mar'i Ibn Yusuf Ibn Ebi baqr Ibn Ahmet Ibn Yusuf al-Maqdi'si "Feraidu Fawaidi'l Fikr Fi'l Imam Al-Mahdi Al-Muntazar”)
According to Nuaym's account from Dinar ibn Dinar; Hazrat Mahdi (as) WILL REMAIN ON EARTH FOR 40 YEARS. (Mar'i Ibn Yusuf Ibn Ebi baqr Ibn Ahmet Ibn Yusuf al-Maqdi'si "Feraidu Fawaidi'l Fikr Fi'l Imam Al-Mahdi Al-Muntazar”)
It appears from the hadiths that Hazrat Mahdi’s (as) intellectual and spiritual dominion over all nations will take a very long time. As Islamic scholars have also stated, it will take time for countries to be spiritually and intellectually conquered by Hazrat Mahdi (as). Al-Barzanji even said that it would take Hazrat Mahdi (as) 40 years to bring about the dominion of Islamic moral values. This shows that it will take at least 40 years after his appearance for people to recognize Hazrat Mahdi (as).
… HIS SPIRITUAL AND INTELLECTUAL CONQUEST OF ALL THE COUNTRIES OF THE HEJAZ WILL TAKE SOME FORTY YEARS... (Al-Barzanji, Al-Isha'ah li-ashrat al-sa'ah, p. 186)