According to one Islamic tradition, the Imam Mahdi will rule for seven years.
This answer is primarily based on the following Hadith:
- Hadith Detailing the Reign: Narrated by Abu Sa'id al-Khudri, the Prophet Muhammad (peace be upon him) said, "The Mahdi will be of my stock, and will have a broad forehead a prominent nose. He will fill the earth will equity and justice as it was filled with oppression and tyranny, and he will rule for seven years." (Book 31, Number 4272)
It's important to note that interpretations of Islamic texts can vary. While the seven-year reign is a common understanding based on the cited Hadith, other interpretations or traditions may exist that suggest a different duration for his rule.