The Shi'a opposed the Umayyad and Abbasid Caliphate, whom they considered usurpers. Instead, they believed in the exclusive right of the descendants of Ali through Muhammad's daughter, Fatima, to lead the Muslim community. This manifested itself in a line of imams, descendants of Ali via al-Husayn, whom their followers considered as the true representatives of God on earth.
At the same time, there was a widespread messianic tradition in Islam concerning the appearance of a mahdī ("the Rightly Guided One") or qāʾīm ("He Who Arises"), who would restore true Islamic government and justice and usher in the end times. This figure was widely expected—not just among the Shi'a—to be a descendant of Ali. Among Shi'a, however, this belief became a core tenet of their faith.
While the awaited mahdī Muhammad ibn Isma'il remained hidden, however, he would need to be represented by agents, who would gather the faithful, spread the word (daʿwa, "invitation, calling"), and prepare his return. The head of this secret network was the living proof of the imam's existence, or "seal" (ḥujja). The first known ḥujja was a certain Abdallah al-Akbar ("Abdallah the Elder"), a wealthy merchant from Khuzestan, who established himself at the small town of Salamiya on the western edge of the Syrian Desert. Salamiya became the centre of the Isma'ili daʿwa, with Abdallah al-Akbar being succeeded by his son and grandson as the secret "grand masters" of the movement.
In the last third of the 9th century, the Isma'ili daʿwa spread widely, profiting from the collapse of Abbasid power in the Anarchy at Samarra and the subsequent Zanj Revolt. Missionaries (dā'īs) such as Hamdan Qarmat and Ibn Hawshab spread the network of agents to the area round Kufa in the late 870s, and from there to Yemen (882) and thence India (884), Bahrayn (899), Persia, and the Maghreb (893).