Early Islamic history is chronicled with several rebellions against the tyranny of the Umawi and Abbasi dynasties. One of those rebellions is referred to as Thawrah Az-Zanj or the Black revolution, Zanj being a term that referred to people of Abyssinian and Nubian heritage.
The leader of Thawrah Az-Zanj was Ali bin Muhammad, who claimed to be a descendant of Prophet Muhammad (SAWS). Ali bin Muhammad was born in Samarra, Iraq during the era of the Abbasi government. In Iraq, he saw the machinations of the Abbasi regime as well as slavery of fellow Muslims throughout Iraq. He eventually left Iraq and moved to Bahrain in which he rallied the people to revolt against the Abbasi government.
After a failed rebellion attempt being led from Bahrain, Ali bin Muhammad relocated to Basrah, Iraq in 247 A.H. in which he called the poor people to follow him, invoking that he was an Alawi, meaning a descendent of Ali bin Ali Talib (KW). His eloquence combined with his lineage attracted followers among the poor in Basrah, which was also a city that had many disenfranchised blacks who both suffered economically as well as had difficulties getting married.
With the support of poor Africans and marginalized Arabs, Ali bin Muhammad unseated the Abbasi authority in Basrah. The Zanji movement had autonomy from the Abbasi government for approximately 15 years before it regained control through brutal force.