Abu Abdallah al-Shi'i

According to later sources, after engaging them in discussion, he found out about the situation in their homeland, the feebleness of the Aghlabid government outside the core territories of Ifriqiya, and the Berbers' own military potential.

[2][6] Moreover, the Kutama, unlike most Berbers, were not followers of the Ibadi Kharijite imamate of Tahert; living on the margins of the settled Muslim society of Ifriqiya, they may have been only superficially Islamicized, retaining many pagan practices.

[2] Abu Abdallah secured the protection of the Saktan clan and immediately began his missionary work, establishing a base in the scarcely populated area of Ikjan.

Disregarding prior tribal or clan affiliations, Abu Abdallah divided his armed followers into seven parts (asba'), and appointed a commander (muqaddam) over each, while newly designated da'is were entrusted with the governance of the districts under their control.

[2][12] The move was born both out of strength and weakness: while Abu Abdallah had consolidated control over most of the Kutama, those of their chiefs who remained opposed to him now turned to the Aghlabid government for support and military help against the da'i and his followers.

Emir Ziyadat Allah III obtained a juridical opinion lambasting the followers of "the man from Sana'a" as heretics, but his military response proved as ineffective as the last.

An army under the prince Ibrahim al-Habashi was sent west but wintered at Constantine, before being joined by the forces of Shabib ibn Abi Shaddad, governor of the frontier province of Zab.

Ibrahim al-Habashi led the combined Aghlabid army into the mountains in pursuit of the Kutama, but at Kayuna it was put to battle and destroyed by Abu Abdallah's men.

As the historian Michael Brett comments, "this was an army on the defensive";[16] as a result, Abu Abdallah ignored it, and moved instead against Tubna (ancient Tubunae), seat of Shabib ibn Abi Shaddad, administrative and military centre of the Aghlabid frontier, and last refuge of the renegade Kutama chieftains.

[17] Tubna was placed under siege for almost a year, before it capitulated on terms in October 906: the garrison was spared, but the renegade Kutama chieftain Fath ibn Yahya al-Masaliti was executed.

[2][23] In the meantime, the hidden Isma'ili imam and Abu Abdallah's true master, the future caliph al-Mahdi Billah, had left Salamiya to avoid Abbasid persecution.

Pressuring and even bribing the caravan leader to make haste, in late 905 they arrived in Sijilmasa, an oasis town in eastern Morocco, ruled by the Midrarid dynasty and a centre of the trans-Sahara trade.

[22][30] Abu'l-Abbas Muhammad, who had escaped from prison and emerged from hiding after his brother's victory, began to spread the Isma'ili doctrine, holding disputations with the local Sunni jurists in the Great Mosque of Kairouan.

[2] On the way to Sijilmasa, Abu Abdallah received the submission of Muhammad ibn Khazar, leader of the nomadic Zenata Berbers,[33] and overthrew the Rustamid Ibadi imamate at Tahert, installing a Kutama governor there.

[36] As the historian Michael Brett explains, the occasion had double meaning: on the one hand, it acknowledged al-Mahdi's caliphate, but on the other, it confirmed the Kutama soldiery in their exceptional status as 'faithful' (mu'minun) or 'friends of God' (awliya), an elite distinct from the mass of ordinary Muslims.

[22] The prophetic traditions about the mahdi, while diffuse, had insisted that his coming would be heralded by celestial signs and portents, that he would be a young man of exceptional beauty, and that he would rapidly and miraculously lead his armies to victory.

By comparison, the reality of al-Mahdi as a man and ruler was disappointing: a 35-year old former merchant accustomed to an easy life, wine, and rich clothing, whose luxurious lifestyle clashed with the austere doctrines propagated by Abu Abdallah and hitherto followed by the Kutama.

[37] Abu Abdallah had never met his master before going to Sijilmasa, and was obviously unaware of his character or intentions; and now he may have felt, in the words of the historian Michael Brett, "as if his own movement had been taken over by one completely different".

The latter was quickly subdued by loyalist Kutama, and Abu Abdallah managed to defeat the Zenata near Tubna, relieving Tahert and even reaching the Mediterranean coast at Ténès.

Map of the fall of the Aghlabid Emirate to the Kutama led by Abu Abdallah