The Qarmatians (Arabic: قرامطة Qarāmita "Those Who Wrote in Small Letters"; also transliterated "Carmathians", "Qarmathians", "Karmathians" etc.) were a Shi'a Ismaili group centered in eastern Arabia, where they attempted to establish a utopian republic in 899 CE. They are most famed for their revolt against the Abbasid Caliphate. Mecca suffered great indignity by the sect’s leader Ṭāhir Sulaymān, particularly with their theft of the Black Stone and desecration of the Well of Zamzam with Muslim corpses during the Hajj season of 930 CE.
The Qarāmaṭah were also known as "the Greengrocers" (al-Baqliyyah) because of their strict vegetarian habits.
Under the 'Abbāsid dynasty (750–1258 CE), various Shī‘ī groups organised in secret opposition to their rule. Among them were the supporters of the proto-Ismā‘īlī community, of whom the most prominent group were called the Mubārakiyyah.
According to Ismaili school of thought, Imām Jaʿfar al-Ṣādiq (702–765) designated his second son, Ismā‘īl ibn Ja‘far "al-Mubārak" (ca. 721–755), as heir to the Imamate. However, Ismā‘īl predeceased his father. Some claimed he had gone into hiding, but the proto-Ismā‘īlī group accepted his death and therefore accordingly recognized his eldest son, Muḥammad ibn Ismā'īl (746–809), as Imām. Muḥammad ibn Ismā'īl remained in contact with the Mubārakiyyah group, most of whom resided in Kūfah.