Muḥammad b. al-Ḥasan al-'Askarī (Arabic: محمد بن الحسن العسکری) (born in 255/869), also known as Imam al-Mahdi (a) (Arabic: إمام المهدی), is the twelfth Imam in Twelver Shi'ism. He is the promised savior, who will rise one day and fill the earth with peace and justice. Imam al-Mahdi (a) has been in occultation from the early years of his life. Shi'as regard him as the Imam of the present age. Among his well-known titles are Imam al-Mahdi (the Imam of the time) and Wali l-'Asr (the guardian of the age).
Imam al-Mahdi (a) became the Imam after the martyrdom of his father Imam al-Hasan al-'Askari (a) in the year 260/874, when he was five. From that time until the year 329/940, he was in contact with his followers through his Four Deputies. After that, his Major Occultation started, in which period the direct guidance and leadership of the Shi'a community rests with religious scholars.
There are many hadiths transmitted from the Imams (a) about Imam al-Mahdi (a), his life, his Occultation, and his government, and many collections of such hadiths have been written. In addition to hadith collections, many works have been published about Imam al-Mahdi (a).