A note: The narration is that these invasions that precede the Dajjal occur during the days of the Mahdi, by the evidence that the Dajjal appears in the last days of the Mahdi. For indeed, the one who kills the Dajjal is Jesus (peace be upon him). He will descend at that time, and the Mahdi will be the Imam and Caliph of the Muslims. Jesus (peace be upon him) will precede him in prayer upon his descent, as has been mentioned recently in a hadith agreed upon, and in another hadith in Muslim.
Introduction to Imam Mahdi (peace be upon him) The Rightly Guided Caliph, Al-Mahdi Muhammad bin Abdullah (peace be upon him). It is narrated that in the end of times, a rightly guided Caliph from the People of the Household will emerge. The Prophet Muhammad (peace and blessings be upon him and his family) said: "The Mahdi is from us, the People of the Household. Allah will support him with religion and he will rule for seven, eight, or nine years. He will fill the earth with equity and justice as it was filled with oppression and tyranny. The Ummah will enjoy a prosperity during his era that it has never enjoyed before. The earth will bring forth its produce, and the sky will send down its rain. The Prophet (peace and blessings be upon him and his family) said: 'My Ummah will enjoy a prosperity during the time of the Mahdi that they have never enjoyed before. The sky will send down abundant rain upon them, and the earth will not withhold any of its produce except that it will bring it forth.' And wealth will be given without count. The Prophet (peace and blessings be upon him and his family) said: 'Wealth will be distributed correctly.'" It was asked: What does "correctly" mean? He said: "Equally among the people." He will be called Al-Mahdi. The Prophet (peace and blessings be upon him and his family) said: "He will be called Al-Mahdi." During his time, fruits will be abundant, crops plentiful, and rains copious. Goodness will be continuous during his days, wealth abundant, and authority overpowering. The Prophet (peace and blessings be upon him and his family) said: "The Mahdi will emerge in the latter part of my Ummah. Allah will give him rain, the earth will bring forth its produce, wealth will be distributed correctly, livestock will increase, and the Ummah will become great."