The history of slavery in the Muslim world was throughout the history of Islam with slaves serving in various social and economic roles, from powerful emirs to harshly treated manual laborers. Slaves were widely used in labour in irrigation, mining, and animal husbandry, but most commonly as soldiers, guards, domestic workers. The use of slaves for hard physical labor early on in Muslim history led to several destructive slave revolts, the most notable being the Zanj Rebellion of 869–883. Many rulers also used slaves in the military and administration to such an extent that slaves could seize power, as did the Mamluks.
Most slaves were imported from outside the Muslim world.