Although both Shi'ah and Sunni Muslims accept the idea of Al-Mahdi (as), they present two different images of him.
The Twelver Shi'ah believe that Al-Mahdi (as) was born 255 AH (896 AD) in Samarah, Iraq, and is the Twelfth Imam according to the Shi'ah belief in Imamah (religious-political leadership). His Divine birth illuminated the world of faith and truth; and the hearts of the victims of oppression and those of the followers of the Household of the Holy Prophet (saws) were filled with happiness. His first name is Muhammad, and Abul Qasim is his patronym. Since the despotic rulers of those days were opposed to this heavenly Savior, they struggled to prevent this Divine birth, and plotted to kill the newborn baby if they failed to prevent his birth.
Shi'ah Muslims also believe that Al-Mahdi (as) by God's command chose the way of Occultation and after the murder (martyrdom) of his Holy father -Imam Hassan Askari (as)- The Twelfth Imam did not visit anyone except his saintly deputies.
His distinguished father died in 269 AH (874 AD), and from that time His Holiness Al-Mahdi (as) disappeared from among the people for approximately 70 years. This period is known as the "Minor Occultation." The Minor Occultation refers to that period of his Occultation when all the followers of Al-Mahdi (as) could communicate with him through the Imam's deputies, and they were able to receive proper answers from him. He appeared only to his deputies (na'ib) and even then only in exceptional circumstances. After this period, his Major Occultation began, where he was/is completely absent and waiting for Almighty God's (swt) command to appear again and establish Divine Rule in the world. This heavenly reign is the ideal of all the messengers of God.
During the Minor Occultation, Al-Mahdi (as) chose as his first special deputy Uthman bin Sa'id 'Umari, one of the companions and trusted friends of his father and grandfather. Through his deputy the Imam would answer the requests and questions of the Shi'ah. After Uthman bin Sa'id, his son Muhammad bin Uthman Umari was appointed the deputy of the Imam. After the death of Muhammad bin Uthman, Abul Qasim Hossayn bin Ruh Nawbakhti was appointed special deputy, and after his death Ali bin Muhammad Simmari was chosen for this task.
A few days before the death of Ali bin Muhammad Simmari in 329/939 a statement was issued by the Imam stating that in six days Ali bin Muhammad Simmari would die. Henceforth the special deputation of the Imam would come to an end and the Major Occultation would begin and would continue until the day Almighty God (swt) grants permission for the Imam to reappear.
Adapted from the book: "The Awaited Saviour; Questions and Answers"