Home » History » Rustamid Dynasty: An Ibadi State in North Africa (776-909)

Rustamid Dynasty: An Ibadi State in North Africa (776-909)

The Rustamids were an Ibādī dynasty, of Persian origin, which reigned from Tāhart (in what is now Algeria) 161-296/776-909. The following summary and narrative of the political history of this fascinating dynasty is adapted from and M. Talbi, “Rustamids” Encyclopedia of Islam, Volume II.

The birth of the Ibādī principality of Tāhart is bound up with the great Berber uprising against the Umayyads begun by Maysara in 122/740. The uprising was reinforced by the Kharijite movement, the puritanical sect of Islam which preached equality of the faithful within the community, and advocated insurrection against an unjust power. Kharijism also advocated open access to the caliphate/imamate (imam is used by the Kharijites in the sense of supreme spiritual guide of the community of the faithful). As a result of this rising, the greater part of the Maghrib fell away definitively from the control of the caliphate in the East, with the exception of the principality of Qayrawān (Kairouan), which only achieved virtual independence with the coming of the Aghlabids in 184/800. The Ibādī chief Abu ’l-Khaṭṭāb al-Maʿāfirī, once elected Imām, seized Tripoli and then, in 141/758, Qayrawān, from where he ejected the Ṣufrī Khārijites and then entrusted its government to ʿAbd al-Raḥmān b. Rustam. It seemed that the whole of the Maghrib, now detached from the caliphate, was likely to fall to Khārijism, with its two strands of Ibādism and Ṣufrism.


Political History

ʿAbd al-Raḥmān b. Rustam b. Bahrām, the founder of the Ibādī principality of Tāhart, was certainly of Persian origin, without one being able to connect him, with any certainty, to the Persian royal house, as certain sources suggest. Having arrived in Qayrawān, with his mother, as a child, he was attracted to Ibādism which, alongside other doctrines, was being taught in the Great Mosque there, until Saḥnūn, appointed qadi in 234/848-9, “broke up the circles of innovators (ahl al-bidaʿ)” and forbade them from spreading their “deviations”. In 135/752, like others, he journeyed to the East n order to complete his education at Baṣra, at that time the spiritual center of Ibādism, at the feet of Abū ʿUbayda Muslim b. Abī Karīma, the great authority of the age, who gave out instruction in which political theology necessarily played a large role, conformable to the general principles of Khārijism which had itself arisen from of a succession to power crisis. Five years later, in 140/757, together with Abu ’l-Khaṭṭāb, he was one of five missionaries, the hamalat al-ʿilm (literally “bearers of knowledge”), who set out for the Maghrib in order to pass on to the phase of the khurūj, i.e. open insurrection, with the aim of installing a just Islamic regime conformable to the Ibādī ideas of an elective and egalitarian theocracy, considering that (in their view) all the previous existing authorities had more or less betrayed true Islam since the time of the arbitration (tahkīm) at Ṣiffīn (37/657).

The conjunction of affairs was at that moment especially favorable. Khārijite ideas had been introduced into the Maghrib some four decades previously, and it found there its most fertile ground. The Ṣufrīs were the first to enter the lists and, thanks to some resounding victories, had founded three principalities: at Sijilmāsa, at Tlemcen and in the region of Salé on the Atlantic shores. The Ibādīs had the ambition of assuming for themselves power over the eastern Maghrib, and nearly succeeded.



However, Baghdād was not yet disposed to relinquish control, and still had the means within its general framework of policy to achieve this. In 144/761 Ibn al-Ashʿath recaptured Ḳayrawān, and Ibn Rustam fled into the central Maghrib. He ended up at Old Tāhart, in a region where several Ibāḍī Berber tribes were solidly established. He was not immediately elected Imām in place of Abu ’l-Khaṭṭāb, killed in battle, but he continued his involvement in the warfare against the ʿAbbasids, and in 151/768 he besieged, without success, the chief town of the Zāb, Ṭubna, the ancient fortress of Tubunda, which had become an advance bastion protecting Ifrīqiya.


The Ibādiyya in the end had to abandon Qayrawān, firmly held by a governor of first-rate competence, Yazīd b. Ḥātim al-Muhallabī, and then decided to found their own principality in the Tāhart region where ʿAbd al-Rahmān b. Rustam had already found refuge. There, in 161/778, “on a slope which dominated, from a height of a thousand meters, the steppes and their pasture-grounds,” and in a place where there was abundant water, they constructed their capital, New Tāhart or Tīhart (9 km/6 miles to the west of present-day Tihert, founded in 1863, the administrative center of a wilāya or province in modern Algeria), around which was built a protective wall with four gates. The site offered advantages at the same time for settled peoples and nomads alike, and constituted a natural fortress.

After his return from Baṣra, ʿAbd al-Raḥmān b. Rustam had already been in charge of various responsibilities, whence the uncertainty of the sources regarding the date of his investiture as Imām. This probably did not take place officially till after the foundation of Tāhart in 162/779. Ibn Rustam evidently combined in himself the conditions of knowledge and piety required by the Ibādiyya for the election of their Imām. But the main reason which tipped the balance in his favor was that, if disputes should arise, he had “no tribe to bring him aid, and no clan to support him”.

Externally, Ibn Rustam practiced a pacific policy with regard to his neighbors, the ʿAbbāsid governors in Qayrawān, the ʿAlid Idrīsids in Fez, and the Ṣufrī Midrārids in Sij̲ilmāsa. Internally, he devoted his efforts to strengthening his power and to furthering the economic prosperity of his principality, thanks, in particular, to financial support from the Ibādiyya of the East, to the impulse given to trans-Saharan trade, and to agricultural and urban development. Tāhart quickly became a rich and cosmopolitan metropolis, and the Sunnī historian Ibn al-Ṣaghīr observed a host of people there, originating stemming from Baṣra, Kūfa, Ḳayrawān and other places, all attracted by the justice and order which prevailed there.

Before his death, which probably took place in 171/788, ʿAbd al-Raḥmān b. Rustam appointed a council to choose a new Imām. The choice fell on his son ʿAbd al-Wahhāb. Till the end of the kingdom of Tāhart, the succeeding Imāms all came from his line, but with a chronology more or less uncertain and with many troubles which often took on the character and tiresome nature of schisms. The following is the most likely succession of the Imāms, theoretically elected but in fact succeeding by virtue of the dynastic succession rule against a background of schisms and political crises:

ʿAbd al-Raḥmān b. Rustam, 161-71/778-88

ʿAbd al-Wahhāb b. ʿAbd al-Raḥmān, 171-208/788-824

Abū Saʿīd Aflaḥ b. ʿAbd al-Wahhāb, 208-58/824-72

Abū Bakr b. Aflaḥ, 258-60/872-4

Abu ’l-Yaqẓān Muḥammad b. Aflaḥ, 260-81/874-94

Abū Ḥātim Yūsuf b. Muḥammad, first reign 281-2/894-5

Yaʿqūb b. Aflaḥ, first reign 282-6/895-9

Abū Ḥātim Yūsuf b. Muḥammad, second reign 286-94/899-907

Yaʿqūb b. Aflaḥ, second reign?

Yaqẓān b. Abi ’l-Yaqẓān, 294-6/907-9

The first schism (iftirāḳ) broke out as soon as ʿAbd al-Wahhāb came to power, with his election contested by a splinter group of the Ibāḍiyya. It took shape as the Nukkāriyya, who had their hour of glory under the command of Abū Yazīd, the “Man on the Donkey”, who almost succeeded in putting an end to the Fāṭimid caliphate of Mahdiyya. Towards 195/811, a conflict broke out between the Ibādiyya of Tāhart and their Zanāta Berber neighbors, who professed Muʿtazilism in its Wāṣilī form. It is related that the controversy preceded the open conflict which was finally resolved in favor of Tāhart, thanks in particular to intellectual and military support from the Nafūsa Berbers of southern Tripolitania.

The second schism which broke out amongst the Ibādiyya was that of the Khalafiyya, from the name of Khalaf b. al-Samh, a grandson of the Imām Abu ’l-Kh̲aṭṭāb, who succeeded his father as governor of the Jabal Nafūsa to the south of Tripoli but without the agreement of the Imām ʿAbd al-Wahhāb, who rightly feared that a new dynasty would become installed there. Khalaf’s partisans, taking as a pretext the discontinuity of the kingdom of Tāhart, proclaimed Khalaf as an independent Imām. The secession of the Jabal Nafūsa continued during Aflaḥ’s imāmate until at least 221/836—the date of a decisive defeat inflicted on Khalaf—and the Khalafiyya maintained their doctrinal stance until the very end of the Rustamids.

Aflaḥ’s reign, an exceptionally long one, was the Golden Age of the Rustamid imāmate. Despite various shocks which rocked the eastern part of the principality, his reign was relatively peaceful. He was able, by a combination of pliant policies and largesse, to impose his authority on the nomadic tribes.


His successors were less fortunate or skillful. The Tāhart principality had fluid frontiers, more human than geographical ones. It was very little urbanized, and had no limes or frontier march supported by a line of powerful fortresses. The Imām’s territory had no other frontiers except those of the tribes which considered themselves Ibādī, and consequently recognized his authority, and this ultimately on the spiritual rather than the temporal level. This was the case e.g. of the Ibādiyya within the Aghlabid principality. Moreover, the principality was a mosaic of very differing ethnic elements: Berber tribes, predominantly nomadic and having divergent interests, Persians who had got rich in the shadow of Rustamid power, and factions of the Arab jund—through their profession, bellicose in nature—who had fled from Ifrīqiya. Once the religious bond became relaxed, all these ingredients became a typically explosive mixture. Hence the internal history of the Rustamid state was full of ups and downs, especially after Aflaḥ’s death.

Armed clashes forced Abū Bakr to yield his power to his brother Abu ’l-Yaqẓān, who was supported by the Arabs. The latter was nevertheless not able to take up residence at Tāhart until 268/882, thanks to the support of the Lawāta and Nafūsa Berbers. Having learned from these occurrences, he followed, it is recorded, a policy of justice, tolerance and balance, on an indispensable foundation of piety, austerity and erudition.

During his own lifetime, Abu ’l-Yaqẓān appointed his son Abū Ḥātim to succeed himself, a procedure not at all, at least in principle, in accordance with Ibāḍi tradition. It is true that the make-up of Tāhart had, meanwhile, changed considerably. Henceforth, at the side of a cosmopolitan plebs or ʿāmma, there were all sorts of groups of people, including a great number of Mālikīs and Shīʿīs, whose weight began to be felt in the political life of the city. In these conditions, an uncle of Abū Ḥātim, Yaʿqūb b. Aflaḥ, preferred to leave the capital and settle amongst the Zuwāgha Berbers who formed part of the Khalafiyya. Civil warfare soon resumed. Abū Ḥātim was driven out of Tāhart and his uncle Yaʿḳūb took his place. But this was not for long, and political alliances, from now onwards no longer reserved for the Ibādī community, were made and unmade according to shifting interests. Yaʿqūb, in turn, lost his capital, and Abū Ḥātim returned to power, supported by the ʿāmma, a mixture of both Ibādīs and non-Ibādīs. Disorder increased and the central power weakened. Abū Ḥātim was ruler only in name, and was assassinated by his nephews, which merely added to the disorders. Yaqẓān b. Abi ’l-Yaqẓān was on the throne when the troops of Abū ʿAbd Allāh al-S̲h̲īʿī came to extinguish the Rustamid principality; Tāhart offered no resistance.

It is difficult to define precisely the territorial extent of the Rustamid power. Its authority was recognized, nominally at least, by several predominantly Ibadi regions, (notably in Tripolitania or in the Jerid), but only extended very partially into the western part of the central Maghreb (the modern Algerian west), where it co-existed with several autonomous Alid principalities, including the Idrissids. Largely unstructured, the Rustamid power does not seem to have given rise to a developed administrative machinery and remained strongly tribal in its workings. The Rustamids’ power base drew mainly on two tribal groups, the Nafusa, who formed the backbone of the army, and the Mazata nomads, affluent thanks to their involvement in the trans-Saharan gold and slave trade. Thus the second Rustamid imam, ‘Abd al-Wahhab, stated that the Ibadi power rested upon “the swords of the Nafusa and the wealth of the Mazata”. The Rustamids do not seem to have struck any distinct coinage, unlike the majority of the Muslim powers of the Maghreb.

Sahara unta

(Trade across the Sahara was a major source of income for the Rustamids)

Tahert: A Flourishing Metropolis in the Aures Mountains

Tahert was the dynasty’s capital and main urban center. The Rustamid settlement, New Tahert, is situated close to an ancient locality, Old Tahert.  According to the classical Arabic narrative sources, it had a citadel and a double rampart, probably dating from the Byzantine period. The Rustamids’ new town, situated on a plateau, is reputed to have been built on the ruins of another ancient site, and this may explain the toponymic Tagdemt (the Berber form of the Arabic qadîm, “ancient”). Crossed as it was by two waterways, New Tahert had sufficient hydraulic resources for the development of prosperous orchards and market gardening. Hydraulic planning work enabled optimum use of this water: and now the ruins of a hydraulic building consisting of a series of basins have been discovered. The town was made up of adjoining districts, based on distinct communities (inhabitants originating from Qayrawan, Kufa and Basra) or tribe (the Nafusa Berbers).


At its apogee, the Rustamid capital was very prosperous. Al-Yaʿqūbī describes it as “an important city, very famous and with a great influence, which people have termed the ʿIrāḳ of the Maghrib”, adding that “a fortress on the coast serves as a port for the fleet of the principality of Tāhart; it is called Marsā Farūkh”. Concerning the commercial routes by land, Ibn al-Ṣag̲h̲īr noted that there were roads connecting Tāhart with the land of Sūdān and with all the lands to the East and the West. It was probably in order to stimulate trade with Sub-Saharan Africa that Abū Bakr b. Aflaḥ sent an embassy headed by a rich merchant of Tāhart, Ibn ʿArafa, to the “king of the Sūdān”. A great tolerance reigned within the city, whose population included, amongst others, Christians (ʿaj̲am), who are described as being especially influential and rich, possessing both a church and a market. The people of Tāhart were fond of controversy and disputation, and the Imāms themselves were often scholars as well-versed in the profane sciences as the religious ones.


A citadel towered over Tahert, called “the impregnable Casbah” by the geographer al-Bakri. Georges Marçais situated it in the south-west corner of the city. It was a rectangular building, with a single direct entrance leading into a large central courtyard, surrounded on four sides by rooms of varying sizes, including living quarters, stables and shops. The defensive function of the Casbah accounts for its sobriety; but this absence of all decoration is also explained by the Rustamid imams’ conspicuous austerity and their puritanical ideology, as embodied in the great mosque, known to us only through written indications. Al-Bakri speaks of a building with four naves, whose vaults were held up by wooden columns. The archaeological material discovered during ancient excavations carried out in Tahert consists mainly of turned ceramic with a distinctive and most characteristic excised decoration. The walls of the vases are adorned with geometric motifs, mostly triangular, but also linear or curved.

d mosque djerba

(Ibadi mosque from Jerba, built during the same period, may give an indication as to the simple structure of the Great Mosque of Tahert)

Foreign Relations

Wedged between two hostile regimes, that of the ʿAlid Idrīsids on the west and that of the ʿAbbāsid governors, and then the Sunnī Ag̲hlabids on the east, the Rustamids practiced, by force of circumstances, a policy of rapprochement: to their south, with the Ṣufrī Midrārids of Sijilmāsa, who, moreover, controlled the vital route by which gold came; and to their north, with the strongly Mālikī Umayyads of Cordova.

To the east, after vain attempts to seize Tripoli from the Aghlabids, the Imām ʿAbd al-Wahhāb, who had directed the battle in person, relinquished the town itself and the seas to the Aghlabids, and contented himself with the hinterland, having been neither conqueror not vanquished, and with a reversion to the status quo ante. In 239/853-4, the Aghlabid Abu ’l-ʿAbbās Muḥammad I built a town in the neighborhood of Tāhart, which he provocatively called al-ʿAbbāsiyya in honor of his suzerains. The Imām Aflaḥ burnt it down and informed the caliph in Cordova of his action; the latter sent him 100,000 dirhams. Finally, in 283/896 Ibrāhīm II inflicted a severe defeat at Mānū, near the sea and to the south of Gabès, on the Nafūsa, the spear-head of Ibādī power. In the west, the Imām ʿAbd al-Wahhāb allowed Idrīs I to capture Tlemcen in 173/789 almost without any adverse reaction.

Across the seas, the Ibāḍī Imāms of Tāhart and the Mālikī amīrs of Cordova had extremely amicable relations, despite their doctrinal differences, united by a common political interest. In 207/822, ʿAbd al-Raḥmān II gave a warm welcome to three sons of the Imām ʿAbd al-Wahhāb arriving at Cordova on an embassy, probably to greet the amīr on his accession to power. In 229/844, “Cordova informed Tāhart officially of its victory over the Vikings”, and in 239/853 the Andalusi emir Muḥammad I sent a sumptuous present to the Imām Aflaḥ on his accession. Furthermore, members of the Rustamid family, installed in al-Andalus, held high offices in Cordova, up to the ranks of commander and vizier.


Tahert had become a major Trans-Saharan trading post: it was an important entepôt for supplies of gold dust and slaves en route between the Maghreb and the Mediterranean. In its dealings with West Africa, it was also a major center for the dissemination of Islam. Indeed, Ibadi merchants and missionaries played an instrumental role in transmitting the teachings of Islam across the Sahara. Tahert was also involved in trade with other parts of the Muslim world: it had a Radhanite market, the Rahâdina being multilingual Jewish merchants who had built up a trade-network with activities ranging from China, India or Transoxiana to the Maghreb, al-Andalus and the Kingdom of the Franks.

In 909, following their victory over the Aghlabids in Ifriqiya, the Fatimid armies overran Tahert, put the last imam, al-Yaqzan (906-909), and his family to death, and devastated the town. The Ibadis of Tahert then took refuge in Sedrata, near Ouargla, in the Algerian desert. The ruins of Sedrata, dating from the tenth to eleventh centuries, are known thanks to ancient excavations. They constitute the legacy of Rastamid art and architecture. Thus a mosque covered with adjoining oval domes and several residential blocks have been uncovered. The art of Sedrata is characterized above all by its plaster decoration, using geometric or floral motifs of simple workmanship, or again Kufic inscriptions. The Ibadis’ presence in Sédrata was relatively brief. Around 1077, the end of a new migratory phase saw them settle in the Mzab, which has remained to this day a veritable bastion of Maghrebi Ibadism.


The Rustamid dynasty provides a unique case in the history of North Africa, whereby a Persian dynasty ruled over a largely rural Berber population and a largely urban Christian population while adhering to the ideological and religious force of Ibadism.

(Above description adapted from: and M. Talbi, “Rustamids” Encyclopedia of Islam, Volume II)




  1. This is a wonderful article. Can I use the photos of this article to give a PowerPoint lecture? I would appreciate it.

    Thank you
    Leonard C. Chiarelli, Ph.D.
    Aziz S. Atiya Library for Middle East Studies,
    Marriott Library, University of Utah,
    295 South 1500 East,
    Salt Lake City, Utah 84112
    Tel: 801-581-6311

  2. Bram says:

    I really like your article. I am from the region and have a degree in religion. It looks very authentic. For more information the best place is Ghardaia.
    Thank you again for sharing.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: