Excerpts from Books and Wikipedia
"Most were sent to work in households, but thousands of Africans--known as Zanj from the Arabic name for the east of African coast--were sent to southern Iraq to drain the salt marshes of Shatt al-Arab around Basra. Others fought in the Abbasid armies. . . . Ali built a well-defended capital at Mokhtara, east of Baghdad. He presented himself as a religious and military leader, offering a purified form of Islam. The Zanj were defeated in 883 only after an amnesty was offered to defectors." [1001 Days]