The Zanj Rebellion was a revolt of enslaved East Africans and other discontented people in southern Iraq against the Abbasid Caliphate, lasting from 869 to 883. Under a charismatic leader, Ali ibn Muhammad, the rebels built a state in the marshes around Basra, sacked the city itself and for more than a decade beat off the caliph's armies. It was one of the longest and most destructive risings in the history of the medieval Middle East, and it struck the caliphate at its weakest point, when Turkish army factions were murdering caliphs and provincial dynasties were breaking away.
The marsh labourers
Zanj was the Arabic name for the lands and peoples of the East African coast, the shores later home to the Swahili towns, and in Iraq it came to mean the enslaved Africans brought there by Gulf merchants. Many were set to work on the great estates of lower Iraq, where the soil of the reclaimed marshes was crusted with salt. Under Islamic law whoever brought dead land into cultivation could claim it, so investors in Basra bought slaves in large numbers to strip off the salty top layer and pile it into long ridges. The labourers worked in large gangs in summer heat that regularly topped 40°C, fed on a little flour, dates and semolina. Smaller revolts by Zanj workers had broken out under the Umayyads, in 689–690 and 694, and been put down.
Ali ibn Muhammad
The man who led the great rising was not a slave or a native of the marshes. Hugh Kennedy, following the Arabic sources, describes him as born to Arab parents near Rayy in central Iran. He had worked as a poet and teacher at the caliphal court in Samarra, and he claimed descent from Ali, the Prophet's son-in-law, a claim his enemies denied and modern historians do not accept. After a failed rising among the tribes of Bahrain and a period of agitation in Basra, he turned in 869 to the marsh labourers. He promised them freedom, wealth, houses and, in time, slaves of their own, and he took the title of Mahdi, the divinely guided ruler. His preaching mixed Shia loyalty to the family of Ali with slogans associated with the Kharijites, and in the Abbasid record he is simply "the abominable one".
A rebel state in the marshes
The rising began in September 869, and within weeks the rebels had defeated the Basrans among the canals south of the city. The landscape suited them: a maze of waterways, reed beds and date groves where government cavalry could not manoeuvre and small boats were the only reliable transport. Deserters from Abbasid units, including free Black soldiers, joined them, as did Bedouin and poor villagers, although the African labourers remained the core. In 870 they took the port of al-Ubulla, and soon afterwards the city of Ahvaz in Khuzestan. Ali built a fortified capital, al-Mukhtara, "the Chosen", on a canal near Basra.
On 7 September 871 the Zanj stormed Basra, one of the greatest commercial cities of the Islamic world. The Arabic accounts describe days of massacre, looting and burning. In the years that followed the rebels raided as far as Wasit, halfway to Baghdad, cutting the waterways that carried food and trade between the capital and the Gulf.
The caliphate strikes back
The Abbasid response was slow because the state was fighting on several fronts. The caliph al-Mu'tamid left military affairs to his brother, al-Muwaffaq, who led a large expedition in 872 that ended in failure when disease spread through his army. For much of the 870s the government was absorbed by the Saffarid ruler Ya'qub ibn al-Layth, who marched on Baghdad from eastern Iran in 876, and by the breakaway Tulunid governors of Egypt. Against the Zanj it settled for containment.
The turning point came in 879, when al-Muwaffaq's son Abu al-Abbas began a methodical campaign in the marshes. Using river fleets, he destroyed the rebels' boats, cut their supply routes and took their outposts one by one. Al-Muwaffaq joined him with the main army, perhaps 50,000 strong, and built a siege town of his own facing al-Mukhtara. The siege lasted about two and a half years, punctuated by offers of pardon that drew away many rebels. In August 883 the city fell and Ali ibn Muhammad was killed; his head was carried through Baghdad on a pole.
Ruin and recovery
The cost was enormous. Medieval authors gave figures of half a million dead or more, which modern scholars dismiss as unreliable while agreeing that the killing, famine and disease claimed tens of thousands of lives at the very least. Basra was rebuilt but never regained its old wealth and importance, and much of the reclaimed land of southern Iraq slipped back into marsh and neglect. For the caliphate the outcome was more mixed. Al-Muwaffaq's victory restored the prestige of the Abbasid family, and Abu al-Abbas went on to rule as caliph al-Mu'tadid from 892 to 902, presiding over a brief revival of central power.
Telling the story
Almost everything known about the revolt comes from the rebels' enemies. Kennedy points out that the Arabic accounts, chiefly the detailed narrative of al-Tabari, all go back to a single long report commissioned by al-Mu'tadid, the general who crushed the rising. Historians have read the revolt in very different ways. The French scholar Alexandre Popovic treated it as a class struggle of the oppressed, while Kennedy finds no sign of demands for social justice and sees a would-be ruler using a desperate workforce in a bid for power. Some writers have argued that memories of the revolt hardened prejudice against Black Africans in the Arab world, a question still debated.
On our maps
Our 800 and 900 maps show the Abbasid Caliphate that the revolt shook, and the 900 map also shows the Saffarids of eastern Iran, whose challenge drew the caliph's armies away from the marshes. The rebel state itself was too short-lived and too small to be drawn.
Key dates
- 868 CEAli ibn Muhammad arrives in the Basra region after a failed rising in Bahrain.
- 869 CEIn September he raises the enslaved marsh labourers in revolt, and in October they beat the Basrans in the canals south of the city.
- 870 CEThe rebels take the port of al-Ubulla; Ahvaz in Khuzestan falls soon after.
- 871 CEOn 7 September Zanj forces storm and sack Basra.
- 872 CEAn army led by the regent al-Muwaffaq fails to crush the revolt and withdraws amid disease.
- 879 CEAbu al-Abbas, al-Muwaffaq's son, opens a river campaign against the rebels' boats and supply lines.
- 881 CEAbbasid forces close in on the rebel capital, al-Mukhtara.
- 883 CEAl-Mukhtara falls in August and Ali ibn Muhammad is killed; his head is paraded in Baghdad.
From the atlas
Zanj Rebellion in time and on the map
Zanj Rebellion lasted from 869 CE to 883 CE. The nearest maps from before and after are 800 CE and 900 CE; compare them side by side.
Living through it, among others on this site: Abu Bakr al-Razi (866–925 CE), Alfred the Great (849–899 CE), Boris I of Bulgaria (827–907 CE), Charles the Fat (839–888 CE), Huang Chao (801–884 CE), Simeon I of Bulgaria (863–927 CE), Rurik (830–879 CE), Muslim ibn al-Hajjaj (817–875 CE), Al-Kindi (801–870 CE) and Muhammad al-Bukhari (810–870 CE).
Other events of the same years: Vietnam under Chinese rule (111 BCE–938 CE), Arab–Byzantine wars (629–1050), Reconquista (722–1492), House of Wisdom (800–1258), Christianization of Scandinavia (800–1200), Carolingian Renaissance (800–900 CE), Great Heathen Army (865–878 CE) and Huang Chao Rebellion (875–884 CE).
Next to it in time on this site: before, Battle of Roncevaux Pass (778 CE) and Treaty of Verdun (843 CE); after, Classic Maya collapse (900 CE) and Norse settlement of North America.
Quick answers
- When did Zanj Rebellion happen?
- It began in 869 CE and ended in 883 CE, lasting 14 years.
- Where did Zanj Rebellion take place?
- Ahvaz, Mesopotamian Marshes and Iran.
- How did the map change?
- Compare the atlas’s maps of 800 CE and 900 CE side by side.
- Who were the Zanj?
- Zanj was the medieval Arabic name for the peoples of the East African coast, and by extension for enslaved East Africans brought to Iraq. In the marshes around Basra they worked in large gangs scraping salty topsoil from the land to make it fit for farming, under harsh conditions with little food.
- Was the Zanj Rebellion a fight against slavery?
- Not in the modern sense. Its leader promised his followers freedom, wealth and power, but there is no evidence he aimed to abolish slavery, and the rebels took slaves of their own from the towns they captured. The historian Alexandre Popovic read it as a class uprising, while Hugh Kennedy argues that its goals were those of a would-be ruler with a religious claim, not a social revolution.
- How many people died in the Zanj Rebellion?
- No reliable figure exists. Medieval writers gave totals running from hundreds of thousands to over a million, which modern historians treat as wild exaggerations, though they agree the death toll ran to at least tens of thousands and that the destruction in southern Iraq was immense.