I've been reading A History of the Arab Peoples by Albert Hourani. It's been a solid read, but naturally because it covers such a large swath of history, many things don't get fleshed out. In chapter 2, he writes:
This was also a period when rulers of outlying provinces of the empire became virtually independent, and in Iraq itself the power of the caliph was threatened by a large and protracted revolt of black slaves in the sugar plantations and salt-marshes of southern Iraq: the revolt of the Zanj, 868-83.
There is no further mention of it, so I'm curious to know some more details about this event.
The Zanj Rebellion is an interesting thing. Most of what we know from the Islamic world in the 800s comes from the work of a single historian, known as al-Tabari (839–923). He wrote the massive History of the Prophets and Kings, spanning events from Creation to the year 915, when surviving copies abruptly end. Especially for the sections before the 800s, al-Tabari essentially compiled earlier histories, but he relied more on his own interpretation of events for things that happened during his lifetime. Essentially, al-Tabari's work was so revered that most other history books were basically left to rot, which means that we generally have no way of knowing how accurate his portrayals were or when he happens to have an axe to grind.
Nonetheless, there's a lot we can discern from his text, which now runs to 39 volumes in English translation(!). Two of these volumes deal with the rise and fall of the Zanj Rebellion—vol. 36, The revolt of the Zanj, and vol. 37, The Abbasid Recovery (those are the editors' titles, not al-Tabari's). They provide almost all of the evidence which is synthesized in the one major scholarly work on the subject, Alexandre Popovic's Revolt of African Slaves in Iraq in the 3rd/9th Century (1999, originally published in French in 1976).
The basic outline of the story is that the booming Abbasid Caliphate was buying up slaves from East Africa and using them for hard agricultural work in lower Iraq around the area of Basra. They were called Zanj, which is connected to the modern name Zanzibar, but ethnic labels were pretty flexible. For instance, Popovic identifies one "Zanj" rebel who seems to have originated in the Byzantine Empire. Popovic also highlights the fact that the Zanj probably weren't all slaves. There were probably large numbers of freedmen and poor free laborers who got wrapped up in the movement, which was itself diverse. Most studies focus on the brutality of Zanj agricultural work like draining swamps or just generally on the dehumanization involved in slavery, but there were also political and perhaps religious goals. Al-Tabari highlights the role of an individual named Ali ibn Muhammad, who seems to have sometimes served as a leader of the revolt. Ibn Muhammad seems to have consolidated power over Basra for a period and claimed descent from Abu Talib, an uncle of the Prophet Muhammad.
The Abbasid rulers were constantly dealing with revolts over the period of the 800s, and from their position at the center of the sprawling Abbasid Caliphate, the Zanj Rebellion was just one distraction among many, albeit one fairly close to their capital cities of Baghdad and Samarra.
Even closer to home, however, were rebellions by Turkish slave soldiers that effectively controlled who got placed on the throne, especially during the 860s, which are sometimes referred to as the period of the Anarchy of Samarra (861-870). For al-Tabari, it seems like the Anarchy of Samarra paved the way for the Zanj to revolt in 868, but once the ruler al-Muʿtamid (r. 870-892) finally reconsolidated power, the end to the Zanj Rebellion came swiftly in 883. (For an excellent read on the Turkish slave soldiers, see Matthew Gordon's Breaking of a Thousand Swords, 2001.)
It's a pretty interesting story, and it's particularly fascinating that al-Tabari dedicates so much space to what might have actually been just the revolt of the relatively minor town of Basra, led by a popular figure and pretender to the position of caliph. Other writers gave much less attention to the subject. In a shorter history by another contemporary, al-Yaqubi, for example, the Zanj leader Ali ibn Muhammad is referenced just twice in the 1200 pages of the modern English translation, and the Zanj Rebellion is never directly mentioned.
And that's the basic outline! There's a lot more work to be done on the subject, and probably a lot of questions we'll never be able to answer, but you've certainly got an instinct for picking up on some of the interesting problems of history!
A quick search provided two similar questions asked here in the past; https://www.reddit.com/r/AskHistorians/comments/4q4sy1/did_the_leadership_of_the_9th_century_zanj/?utm_medium=android_app&utm_source=share With an answer by u/textandtrowel
And one here with answers from u/Davratta and u/raaaghb https://www.reddit.com/r/AskHistorians/comments/1amkr4/the_zanj_rebellion/?utm_medium=android_app&utm_source=share
But the topic is certainly an interesting one and it invites further inspection and discussion!