The Arab slave trade, across the Sahara desert and across the Indian Ocean, began after Muslim Arab and Swahili traders won control of the Swahili Coast and sea routes during the 9th century.
These traders captured Bantu peoples (Zanj) from the interior in present-day Kenya, Mozambique and Tanzania and brought them to the coast. There, the slaves gradually assimilated in the rural areas, particularly on the Unguja and Pemba islands.
Some historians assert that as many as 17 million people were sold into slavery on the coast of the Indian Ocean, the Middle East, and North Africa, and approximately 5 million African slaves were transported by Muslim slave traders via Red Sea, Indian Ocean, and Sahara desert to other parts of the world between 1500 and 1900.
The captives were sold throughout the Middle East. This trade accelerated as superior ships led to more trade and greater demand for labour on plantations in the region. Eventually, tens of thousands of captives were being taken every year.
The Indian Ocean slave trade was multi-directional and changed over time. To meet the demand for menial labor, Bantu slaves bought by Arab slave traders from southeastern Africa were sold in cumulatively large numbers over the centuries to customers in Egypt, Arabia, the Persian Gulf, India, European colonies in the Far East, the Indian Ocean islands, Ethiopia and Somalia.
Slave labor in East Africa was drawn from the Zanj, Bantu peoples that lived along the East African coast. The Zanj were for centuries shipped as slaves by Arab traders to all the countries bordering the Indian Ocean.
The Umayyad and Abbasid caliphs recruited many Zanj slaves as soldiers and, as early as 696, there were revolts of Zanj slave soldiers in Iraq. A 7th-century Chinese text mentions ambassadors from Java presenting the Chinese emperor with two Seng Chi (Zanj) slaves as gifts in 614, and 8th- and 9th-century chronicles mention Seng Chi slaves reaching China from the Hindu kingdom of Sri Vijaya in Java.
The Zanj Rebellion, a series of uprisings that took place between 869 and 883 AD near the city of Basra (also known as Basara), situated in present-day Iraq, is believed to have involved enslaved Zanj that had originally been captured from the African Great Lakes region and areas further south in East Africa.
It grew to involve over 500,000 slaves and free men who were imported from across the Muslim empire and claimed over "tens of thousands of lives in lower Iraq". The Zanj who were taken as slaves to the Middle East were often used in strenuous agricultural work. As the plantation economy boomed and the Arabs became richer, agriculture and other manual labor work was thought to be demeaning. The resulting labor shortage led to an increased slave market.