his ancestor is known by the kunyah Abū al-Hasan—is better than this, and clearer for anyone seeking guidance and clarity.
Moreover, the Mahdī described (1) is a descendant of al-Hasan ibn ‘Alī, not of al-Husayn, as indicated by the wording of ‘Alī’s hadith quoted earlier.
Third: Various groups have each claimed (2) that their Mahdī was the one whose coming had been foretold. One example is the Mahdī of the esotericist Qarmatians, who established their movement in the Maghreb. He was a descendant of Maymūn al-Qaddāh, and they claimed that this Maymūn himself (3) was a descendant of Muhammad ibn Ismā‘īl. The Ismā‘īliyyah claimed descent through this lineage. In their inward beliefs, they are heretics, outside all religions; their unbelief is greater than that of extremist sects such as the Nusayriyyah. Their doctrine combines the teachings of the Magians, the Sabians, and the philosophers, while outwardly professing Shiism. Their ancestor was a Jewish man who was the stepson of a Magian. They had a state and followers.
Scholars wrote books exposing their secrets and stripping away their concealment, including works by Judge Abū Bakr al-Bāqillānī, Judge ‘Abd al-Jabbār al-Hamdānī, al-Ghazālī, and others.
Among those who claimed to be the Mahdī was Ibn Tūmart, who also rose in the Maghreb and called his followers al-Muwahhidūn (the Monotheists). In their sermons, they referred to him as “the infallible imam” and “the known Mahdī,” who would fill the earth with equity and justice, just as it had been filled with oppression