As per the traditions, when Imam would be on his way to Mecca, severe heat and fatigue would force him to rest a tree. Gabriel would descend with a letter (while its ink still wet). In that letter, Allah commands him to rise. He will come to Mecca. In Mecca, between ‘Rukn’ and ‘Maqam’ he would lean besides Hajar-ul-Aswad and the door and call out:
“الا يا اهل العالم! بقية الله خير لكم ان كنتم مومنين و انا بقية الله
(Muntakhab-ul-Athar: 575, tradition 6 and 580, tradition 2 and 3, new edition).
Thus, he will call the people in this manner. When all of his 313 special companions (whether those of that time or those from the past who have returned to life) would gather around him, they would depart for Medina and then towards Kufa. They shall settle in Kufa and manage the affairs of the world from this very place.
In traditions, we find that the period of Imam Mahdi’s state would last for 7 or 9, or 20 or 30 or 40 or 70 years. Regarding these figures, we had explained in our reply to another query that possibly seven or nine years refers to the period for setting up the government otherwise if seven or nine or even thirty years of rule, after so long waiting will be too short to satiate the justice lovers. Thus, it’s appropriate for Allamah Majlisi to say that probably the holy Imams didn’t wish to specify the exact duration of Imam’s rule and Allah is All-Aware of the realities.