Allah reveals in the Qur’an that he has chosen and sanctified Phrophet Abraham (pbuh) and his line (Surat al-Baqara, 130, Surah Al-Imran, 33). The same information also appears in the Judaic Torah (Genesis, 22:17, 12:2)
The line of Prophet Abraham (pbuh) continued with his two sons, the prophets Ishmael and Isaac (peace be upon them). Throughout the course of history, a large number of prophets descended from Prophet Isaac (pbuh) came to the Israelites: the prophets Jacob, Joseph, Moses, Aaron, Jonah, Job, Elijah, David, Solomon, Zaccariah, John and Jesus (peace be upon them). Descended from the line of Prophet Ishmael are the Prophet of Islam, Muhammad (may Allah bless him and grant him peace), teachers from his line and finally the Imam Muhammad al-Mahdi.
Allah protected the two branches of the descendants of Prophet Abraham (pbuh) in order for them to establish their dominion. In the End Times, He will unite the Imam al-Mahdi and Prophet Jesus (pbuh) in order for that promise to be fulfilled.
According to the hadiths of our Prophet (may Allah bless him and grant him peace), the Mahdi will meet up with Prophet Jesus (pbuh), and they will perform the daily prayer together. One account relates that the Mahdi will recognize Prophet Jesus (pbuh) and offer him public recognition. The Mahdi and Prophet Jesus (pbuh) will reign together for a while on Earth and collaborate in order to eradicate the system of the Anti-christ. (Allah knows best.)
In referring to the End Times, the Bible sometimes uses very clear terminology as to when the Mahdi will appear. It appears that this period preceding the coming of the Mahdi will be one of social and moral degeneration, major wars, terrifying catastrophes, extraordinary phenomena in the skies, a turning away from religious moral values, the spread of injustice and unfairness, the oppression of true believers, and peace and security being replaced by chaos and unease.
In this site you may find detailed information on Mahdi according to the Torah, the Qur’an and the Bible.