A claimant Mahdi can wield great temporal, as well as spiritual, power: claimant Mahdis have founded states (e.g. the late 19th-century Mahdiyah in Sudan), as well as religions and sects (e.g. Bábism, or the Ahmadiyyamovement). The continued relevance of the Mahdi doctrine in the Muslim world was most recently emphasised during the 1979 seizing of the Grand Mosque in Mecca, Saudi Arabia, by at least 200 militants led by Juhayman al-Otaibi, who had declared his brother-in-law, Muhammad bin abd Allah al-Qahtani, the Mahdi.
Ṣāliḥ ibn Tarīf
Ṣāliḥ ibn Tarīf, the second king of the Berghouata, proclaimed himself prophet of a new religion in the 8th century. He appeared during the caliphate of the Umayyad Hisham ibn Abd al-Malik. According to Ibn Khaldun‘s sources, he claimed receiving a new revelation from God called a Qur’an, written in the Berber language with 80 chapters. He established laws for his people, which called him Salih al-Mu’minin (‘Restorer of the Believers’), and the final Mahdi.
Islamic literature considers his belief heretical, as several tenets of his teaching contrast with orthodox Islam, such as capital punishment for theft, unlimited wives, unlimited divorces, fasting of the month of Rajab instead of Ramadan, and ten obligatory daily prayers instead of five. Politically, its motivation was presumably to establish their independence from the Umayyads, establishing an independent ideology lending legitimacy to the state. Some modern Berber activists regard him as a hero for his resistance to Arab conquest and his foundation of the Berghouata state.
Abdallah ibn Muawiya
Abdallah ibn Muawiya was descendant of Jafar ibn Abi Talib. At the end of 127 AH/ 744 CE Shia’s of Kufa set up him as Imam. he revolted against Yazid III, the Umayyad Caliph, with the support of Shia’s of Kufa and Ctesiphon. He moved to west of Iran and Isfahan and Istakhr. He managed to control the west of Iran for two years. Finally, he was defeated by the caliph armies in 746-7 CE and fled to Harat in Khorasan. He died in Abumuslim prison, his rival. His followers did not believe his death and said that he went to occultation and he would return as Mahdi.
Muḥammad ibn al-Ḥasan al-Mahdī
Muhammad ibn Hasan ibn Ali (29 July CE 869/15 Sha‘bān 255 AH – ?), more commonly called Muhammad al-Mahdi, is the twelfth imam of Twelver Shia Islam. He is believed by Twelver Shī‘a Muslims to be the Mahdī, an ultimate savior of humankind and the final Imām of the Twelve Imams. Twelver Shī‘a believe that al-Mahdī was born in 869 and did not die but rather was hidden by God (this is referred to as the Occultation) and will later emerge with Isa (Jesus) in order to fulfill their mission of bringing peace and justice to the world. He assumed the Imamate at 5 years of age. Some Shi‘īte schools do not consider ibn-al-Hasan to be the Mahdī, although the mainstream sect Twelvers do.