The Zanj slaves rebellion, AD 869-883

A history of the Zanj slave rebellion - East African slaves in Mesopotamia during the 9th century. These events took place around Basra, in modern day Iraq.

Submitted by Mike Harman on July 4, 2007

Zapping the Zanj: Towards a History of the Zanj Slaves' Rebellion
Revised on: 16 October 2002. This is an ongoing investigation. Credible sources regarding the Zanj are hard to come by. Melancholic Troglodytes would appreciate any assistance from readers.

"Once war is declared, [the skillful soldier] will not waste precious time in waiting for reinforcement ... but crosses the enemy's frontier without delay. This may seem an audacious policy to recommend, but with all great strategists the value of time has counted for more than either numerical superiority or the nicest calculations..."
- Sun Tzu, The Art of War


It is amazing how many genuine proletarian revolts have begun by us throwing pots, pans and the kitchen sink at the class enemy. The Zanj Slaves' Rebellion (869-883 A.D.) began in similar humble circumstances. Armed with sticks, two horses and three swords the wretched of the earth declared war on slavery and the Holy Empire of Islam.

What distinguishes the Zanj from numerous other slave rebellions cannot be measured in terms of numbers or the length of their struggle alone because one needs to bear in mind the aptitude displayed time and again in outmanoeuvring the ruling class. Instinctively they knew what needs to be done. That is not to belittle their numbers for this is one instance when quantitative comparisons are not misleading. The Spartacus Rebellion lasted for 3 years (73-71 BCE) and involved around 120,000 slaves. By contrast, the Zanj were 500,000 strong and maintained a marooned state for 15 years. Perhaps it is a blessing in disguise that their history has not been subjected to the gaze of Hollywood for the latter has an inbuilt tendency for de-memorizing and reifying proletarian resistance to class society. It is, therefore, left to us 21st century proles to re-create the world and times of kindred spirits separated from us by more than a millennium.

"Hence a wise general makes a point of foraging on the enemy. One cartload of the enemy's provisions is equivalent to twenty of one's own..."
- Sun Tzu, The Art of War


No sooner had they taken up arms (well pots and pans to be more precise) against their exploiters that they became adept at night-raids on enemy territory, liberating weapons, horses, food and fellow slaves, burning the rest to cinders to delay retaliation. During their 15 year uprising (869-883 A.D.) the Zanj acquired what was for its time state of the art technology: siege-laying catapults; flame-throwers; rapid chariots; multi-headed arrows. They trained expert engineers who blocked the enemy's advance by constructing impenetrable fortresses, cocooned inside layers of water canals or conversely built rapid bridges and communication lines for uninvited courtesy calls to the citadels of the gods.

Perhaps taking a leaf out of Spartacus's defeat they did not handicap themselves by ignoring the seas. They possessed war ships and freighters. In one battle alone they overcame the Khalifeh's navy to capture 24 ships, which had been chained together by their captains to enhance their defensive capabilities! Rafi' in what seems to us an exaggeration puts the Zanj naval force at 1900 ships!

"We are not fit to lead an army on the march unless we are familiar with the face of the country - its mountains and forests, its pitfalls and precipices, its marshes and swamps."
- Sun Tzu, The Art of War


The Abbasi Empire (750-1258 AD) understood the concept of a progressive civilization as one constantly increasing its surplus profit. The Tigris-Euphrates delta, which had become abandoned marshland as a result of peasant migration and repeated flooding, could be reclaimed through intensive labour. Wealthy proprietors "had received extensive grants of tidal land on the condition that they would make it arable" (Davis, Slavery And Human Progress, p5).

To this end Zanjis, or black slaves of East African origin, were imported. The term Zanj appears on the one hand associated to a certain geographical area and on the other it became a "free-floating" classificatory label used for stereotyping the zanj-as-enslaveable barbarians. This construct then facilitates the ideological justification for slavery (P. F. de Moraes Farias, Slave & Slavery in Muslim Africa, ed. J. R. Willis, vol. I, p 27).

The preponderance of foreign slaves in the Islamic Empire was due to an ironic quirk in the evolution of Islam. The orientalist, Bernard Lewis, is reasonably lucid on this. He starts by noting, "Quran expresses no racist or colour prejudice" (B. Lewis, Race and Slavery in the Middle East, p 21). In fact it had no conception of race in terms of colour, having already decided on the believer/non-believer criterion for social exclusion. That is not to say early Muslims were colour blind (see for example, Quran, Chapter XLIX, Verse 13). Quran's lack of prejudice merely reflected the attitude of pre-Islamic Arabs who possessed a tribal/ethnic rather than a racial consciousness. Although, it is worth remembering that, as a reaction against Persian expansionism the latter were derogatory referred to as "the red people".

There was a gigantic hypocrisy at the heart of the Islamic attitude to slavery from the outset. For whereas the prophet himself both possessed slaves and permitted slavery as an institution to flourish, the humanitarian tendencies within Islam prohibited actual enslavement (except during war or as tribute). Thus a dialectical loop was established whereby economic productivity required an increase in the importation of slaves leading to the further commodification of humans and a corollary racist ideology to justify subjugation, which in turn fuelled crusades in search of more slaves.

Islamic Humanism preceded its Renaissance counterpart by centuries, finding its negation in the institutions of slavery. It was to the Zanjis credit that they managed to temporarily supercede this dichotomy. Later on, this humanism having failed to connect to a generalized system of commodity production degenerated into humanitarianism. Paul Mattick (Anti-Bolshevik Communism, p 158) makes a valid generalization for the European arena where humanism did reach impressive levels of achievement and where its fall from grace was even more spectacular than its 'oriental' counterpart: "With the bourgeoisie securely established, humanism degenerated into humanitarianism for the alleviation of the social misery that accompanied the capital formation process". The reign of the Islamic bourgeoisie has been more halting and uneven, less secure. Some of the battles won by the 'western' bourgeoisie against European feudalism are still to be completed by its 'eastern' counterpart. Consequently, one would expect a more lingering humanist tradition amongst the Islamic intelligentsia. This is precisely why (bourgeois) sufism remains a powerful current within 'Islamic' societies.

Compared to the Roman Empire whose slaves were mostly local, the greater distances involved in the transport of slaves, led to a more sophisticated slave trade in Islam. Lewis reminds us that through conquest, commerce, concubage and pilgrimage to Mecca, Islam created the first truly universal civilization. Here the term 'civilization' is not employed in a moralistic sense but refers to a system, which creates more surplus value than previous ones. Moreover, we would qualify the universalistic claims of Islam by pointing out that its foundation, the umma (Islamic community) is an 'imagined community' where class and gender inequalities are systematically covered up. It is significant that this imagined community needed external enemies for its survival and employed divide-and-rule tactics as brazenly as its 'western' equivalent. However, despite the policy of dividing the laborers by nationality, pursued by successive khalifehs, international solidarity between the slaves reached new heights.

"What the ancients called a clever fighter is one who not only wins, but excels in winning with ease."
- Sun Tzu, The Art of War


Although African slaves working the marshlands and salt mines of Mesopotamia, especially those around Basra, sparked the rebellion, they were soon joined by other slaves, serfs, peasants, artisans, tribal Arabs, manumissioned slaves and the usual rent-a-mob-rabble that are forever lurking around the dark and dubious alleyways of history, waiting for an opportunity to do mischief.

One such malcontent was a Persian by the name of Ali Razi (aka Zangi-yar, literally translated, mate of the Zanjis) who became the leader of the rebellion. He promised his followers heaven on earth and punished slave-owners severely in public trials. His knowledge of the occult and expertise with the astrolabe confirmed his supernatural status. This is not as strange as it sounds. Spartacus was credited with similar powers: "According to the credulous Greek historian, Plutarch, serpents curled around [Spartacus] whilst he slept, and his prophetess wife foretold his greatness even when he was still a slave" (F. A. Ridley, Spartacus, p 37). Razi appropriated the wealthy and persuaded their slaves through reasoned arguments to join his ranks. In his speeches he repeatedly asks the slaves to execute him unhesitatingly if he should betray their trust. Razi's pledge seems far more genuine than similar oaths in other secret societies, for instance the Caraboneri.

The fact that the success of the rebellion depended on the leadership of Razi is certainly a source of weakness. However, it is pointless to deny that many past struggles suffered from having to rely on charismatic leaders (Of course, some idiots still need the charisma of people like Subcommandante Marcos, Che, Malcolm X, Bakunin and Lenin to make them feel safe. The problem may have been ameliorated in recent decades but not completely overcome). For example, the First Sicilian Slave-War (134-129 BC) witnessed the rise of the Syrian rebel/king, Eunus, who was credited with magical power. The first widespread uprising of the Zanj in 866 AD was led by an African called Sharih Habash. Three years later the Zanj chose Ali Razi to be their leader. In so far as he stamped his personality on the revolt, we need to consider him.

From their fortress-city of Mokhtarieh (Autonomia) they attacked and vanquished two Khalifehs, numerous hapless generals, raised mosques to the ground- all the time increasing their power and prestige. Davis in Slavery and Human Progress concedes that the Zanj established what might have been the first maroon community in recorded history, "that is, protected, self-sufficient communities of fugitive slaves". Arguably, the Zanj were even more ambitious than this quote suggests and western scholars marginalization of their struggles seems a tad suspicious to paranoids like us. Davis seems particularly confused on this score. As for Mokhtarieh, perhaps it should be compared with the intended utopian City of the Sun, Heliopolis. Aristonicus (a disgruntled Royal turned rebel) "issued a proclamation freeing all slaves who should come to this city" (circa 130 BC). Mokhtarieh was Heliopolis incarnated. Slaves from neighbouring countries flocked to their banner, Turks, Slavs, Persians, Arabs, so that by the end of their 15-year reign of revolutionary terror non-Africans outnumbered the original rebels.

"Keep your army continually on the move, and devise unfathomable plans".
- Sun Tzu, The Art of War


It pleases the Machiavelli and Cesare Borgia in us to observe that the Zanj never lost sight of the 'conspiratorial' nature of their adventure. Even in the beginning, although lacking in weapons, they displayed great organizational skills. They were ice-cool. Having devised a secret plan, Ali Razi informed his fellow rebels of the details by code. Accordingly each slave was to assassinate on the hour of the same day his (and most were male) master and thus take over his house, wealth and land. The plan worked so well that in no time at all most of present day Iraq, Bahrain and parts of Iran came under their rule.

The arrogance of the ruling class can be turned to their disadvantage. Throughout classical antiquity slaves were referred to as "talking masks" or "animated instrument". The rapid victories of the Abbasi Dynasty had instilled the same sense of haughtiness in the Muslim elite. Their racism, as we will see below, became self-defeating as the slaves were underestimated time and again by their ex-masters.

The racism of the ruling Muslim elite ran deep and became worse as the empire became ever more dependent on slave labour. For instance, the famous Muslim historian, al-Mas'udi, basing himself on the authority of Galen states the ten qualities of Sudanese, thusly: "Kinky hair, thin eyebrows, broad noses, thick lips, sharp teeth, malodorous skin, dark pupils, clefty hands and feet, elongated penises and excessive merriment". Further on he quotes Galen approvingly: "surely the dark complexion person (al-aswad) is overwhelmed by merriment due to the imperfection (fasad) of his brain; therefore, his intellect is weak" (see Akbar Muhammad, Slaves and Slavery in Muslim Africa, vol. I, p 68).

Elsewhere, al-Mas'udi relates the cause of blackness to the curse of God based on the Old Testament story of Ham/Canaan, "stricken in his semen because of his sexual relation with his wife in the Ark" (see Ephraim Isaacs in the same book for a discussion of whether it was the curse of Ham or Canaan). Although rabbinical ideologues believed in the idea of moral chosenness as evident in the racialism inherent in so much of their writings, it was left to Islam to turn this notion of desired separateness into outright racism, the belief in the biological/cultural superiority of one's own race over others. After all, Islam, unlike ancient Jewry, had an empire to run!

Ibn Qutayba thought blacks were "ugly and misshapen, because they live in a hot country. The heat overcooks them in the womb and curls their hair". Even the genius of Ibn Khaldun was tainted by prejudice against blacks: "Therefore, the Negro nations are, as a rule, submissive to slavery because [Negroes] have little [that is essentially] human and have attributes that are quite similar to those of dumb animals..."

"Do not repeat the tactics which have gained you one victory, but let your methods be regulated by the infinite variety of circumstances".
- Sun Tzu, The Art of War

Against such a tirade of bigoted intolerance some black writers began to deliver counter-jabs. Perhaps one of the first expressions of "Black is beautiful" came in the shape of a treatise written by the satirist Jahiz of Basra (ca. 776-869), entitled The Boast of Blacks Against Whites, where he purports to defend the Zanj against their detractors. But these intellectual efforts remained woefully limited in scope. For example, the satirist and court jester, Abu Dulama (d. ca. 776), a black Arab poet, was pressurized into self-derogatory comic routines for the amusement of his Abbasi masters. Lewis (Race and Color in Islam, p 17) even suggests that Jahiz, being a humorist, was not "wholly serious" in his defence of Africans despite being probably of African descent himself. He was certainly more Arab than the Arabs on one occasion when he attacks the Zanj with venom: "We know that the Zanj were the least intelligent and the least discerning of mankind, and the least capable of understanding the consequences of actions..." As ever misconceptions were best fought during the struggles of the slaves themselves.


Ansaf-pour has estimated that the Zanj fought the forces of the empire on 156 separate occasions during their 15-year campaign. Most of the battles waged in the first six years were won through a mixture of bravery and surprise guerrilla tactics.

In their seventh engagement, for instance, they out-smarted the Khalifeh's generals by attacking two villages simultaneously. They acted ruthlessly when required (executing thousands for siding with the khalifeh) and magnanimously when it made sense (releasing captured soldiers as part of their propaganda war against the Empire).

"Be subtle! Be subtle! And use your spies for every kind of business".
- Sun Tzu, The Art of War

Even a movement as non-compromising as the Zanj could not avoid occasional contact with class enemies. Merchants who sold them provisions when stocks were low, soldiers who defected to their side only to prove treacherous and most damaging of all pseudo-rebels who turned coat at the earliest opportunity.

The prime example of this is Ya'ghub, a Persian who as a (muslim) nationalist fought the invading (muslim) Arab army, 'liberating' vast junks of Iran. However, the egalitarian principles of the Zanj proved anathema to him and when the crunch came he sided with the Khalifeh against the slaves, delivering a body blow from which the Zanj never recovered. The historical lessons of the Paris Commune (that the bosses are always prepared to suspend faction fights and unite against the proletariat) came as no surprise to the Middle Eastern proletariat. Ya'ghub 'the cunt' taught us that particular lesson long ago!

All this forced the Zanj to develop their intelligence-gathering network far and wide. Local and converted spies were employed to discover the enemy plans. Ali Razi would order the snatching of slaves from muslim dominated areas who were then questioned about their masters' intentions, and released unharmed having in most cases become converted rebels. And with these messengers the Zanj preached their egalitarian doctrine to all those who would listen.

The different strands in their movement complemented each other to produce an all-pervasive assault against private property. The Africans and the tribal Arabs contributed to the communist trend by attempting to build non-hierarchical communes similar to the tribes they remembered from before slavery and the Persians under the influence of Mazdaki ideology emphasized the possession of all things in common.

The Zanj rebellion is one of the few slave revolts where women took an active part in the struggle. It is worth noting that women and children were particularly in demand in Islamic lands and hence predominated in the slave trade.

"Humble words and increased preparations are signs that the enemy is about to advance. Violent language and driving forward as if to attack are signs that he will retreat."
- Sun Tzu, The Art of War


The Islamic Empire which was born a 'feudal' entity, had after three centuries of growth acquired millions of slaves working in mines, factories, marshlands, agriculture and household duties. This had created a parallel, though subordinate, mode of slave production alongside 'feudalism'. A sign that there was a surplus of slaves can be seen in their use as court entertainers. Eunuchs, virgins and even transvestites were employed for the pleasure of the Muslim elite. In slave markets, known as spectacles, the price of slaves could suddenly fall after a military victory. Anticipating 20th century consumerism, one smart trader decided to give away a free extra slave for every 40 Turkish slaves bought, in order to boost flagging sales!

The first slave traders' manual (vade mecum), which appeared in the 10th century, concentrated on the physiological and physiognomic features of the slaves and could be viewed as a forerunner of the science of phrenology. Later studies analyzed ethnological aspects also. Ibn Buttan who wrote a complete study of the subject suggested an elaborate technical division of labour for slaves.

All this knowledge regarding its victim came in handy when the ruling class finally got its act together and began to wear down the Zanj militarily while sowing the seeds of distrust amongst them. Cities controlled by the Zanj began to fall to the superior forces of the khalifeh. Mokhtarieh, their capital and flagship, was besieged for two year. Finally, in a surprise and daring counter-attack, Razi and some of his closest associates fought their way out of the Muslim's stranglehold to fight one last battle. But the game was up and they knew it. When the end came, Razi's severed head was paraded throughout the region to convince the remaining free slaves that resistance was futile. Yet, thousands refused to believe and fought on in small enclaves in the hope of a miracle that never materialized.


"Hence the saying: If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know the enemy but not yourself, for every victory gained you will suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle."
- Sun Tzu, The Art of War

A bourgeois reactionary once explained the failure of the slaves' revolts in the Roman Empire thusly: " ... the uprisings were unsuccessful because even in the most revolutionary crisis of history the slaves were always the tools of the ruling classes" (Lenin quoted in W Z Rubinsohn, Spartacus' Uprising and Soviet Historical Writing). Thankfully no one bothered to tell Lenin about the Zanj revolt. Ironically Stalin who had based his thesis of the division of human history into 5 successive periods on Lenin, came to exactly the opposite conclusion: "...the great slave-uprisings of the declining Roman Republic annihilated the slave-owner class and the slave-owner society" (J. V. Stalin, vol 13, p 239, Speech to the First All Soviet Congress of Kolcholz-peasants). Had Stalin passed the same judgment on the Zanj rebellion he would still be wrong but at least on safer ground! As it is both he and Lenin set back any serious analysis of class struggle in the ancient world through their ill-informed and reactionary rhetoric. Middle Eastern scholars are to this day grappling with the adverse repercussions of their rants.

What we can say with a reasonable amount of certainty is that there were certain inherent weaknesses in the Zanj movement which went unnoticed while they were winning battles and attracting new members, but as soon as they stalled on the military front, the flaws crystallized as insoluble obstacles.

Following Hannibal's famous victory at Cannae, Marharbal, his cavalry commander urged him to march on Rome. When Hannibal refused Marharbal retorted: "The gods have taught you how to win victories, Hannibal, but not how to use them". The same criticism can be levelled at the Zanj. Having fought the forces of Islam to a standstill, they failed to take advantage. They lacked a master plan. Gradually with the new wealth accumulating in their coffers they began to imitate their old masters. A rigid hierarchical structure and an elitist attitude towards the rank and file created disillusionment. Some of the top generals in the Zanj army became indistinguishable from the hated landlords. Ali Razi who clearly understood the alienation all this created, seemed powerless to do anything about it.

The same problem resurfaced again in 17th century maroon communities of the Caribbean. "The long survival of Palmores, for example, meant that the monarchy of King Ganga Zumba assumed truly dynastic form.... Perhaps the most bizarre development in this respect was the appearance of Indian leaders of resistance in Brazil... who, under the impact of Portuguese Catholicism, styled themselves popes" (K R Bradley, Slavery and Rebellion in the Roman World, p 10-11).

The heterogeneity of the slaves, which was previously a source of strength, now became a source of friction. Household slaves and eunuchs began arguing whilst Razi and his generals fell out over tactics. Some would argue that even in defeat the Zanj were victorious, in the sense that they (and similar other contemporaneous revolts) forced the Islamic ruling class to dispense with slavery as an auxiliary mode of production to 'feudalism'. The slaves' workload was lessened and they were gradually transformed into peasants and serfs, some being 'freed' into wage-slavery. Accordingly the Zanj inaugurated a social revolution but not the social revolution. But perhaps their greatest mistake as with many proletarians before and after them was to ignore the wisdom of the ancient axiom:

"In war, then, let your great object be victory, not lengthy campaigns".
- Sun Tzu, The Art of War

Address for correspondence: Melancholic Troglodytes, c/o 56a Infoshop, 56 Crampton Street, Walworth, London SE17 3AE, United Kingdom.

Email: meltrogs1 (at)