Slavery in Africa has existed throughout the continent for many centuries, and still continues in the current day in some countries. Systems of servitude and slavery were common in parts of the continent, as they were in much of the ancient world. In most African societies where slavery was prevalent, the enslaved people were not treated as chattel slaves and were given certain rights in a system similar to indentured servitude elsewhere in the world. When the Arab slave trade and Atlantic slave trade began, many of the local slave systems changed and began supplying captives for slave markets outside of Africa.
Slavery in historical Africa was practiced in many different forms and some of these do not clearly fit the definitions of slavery elsewhere in the world. Debt slavery, enslavement of war captives, military slavery, and criminal slavery were all practiced in various parts of Africa.
Multiple forms of slavery and servitude have existed throughout Africa during history and were shaped by indigenous practices of slavery as well as the Roman institution of slavery (and the later Christian views on slavery), the Islamic institutions of slavery, and eventually the Atlantic slave trade. Slavery existed in parts of Africa (like the rest of the world) and was a part of the economic structure of some societies for many centuries, although the extent varied.Ibn Battuta, who visited the ancient kingdom of Mali in the mid-14th century, recounts that the local inhabitants vied with each other in the number of slaves and servants they had, and was himself given a slave boy as a "hospitality gift." In sub-Saharan Africa, the slave relationships were often complex, with rights and freedoms given to individuals held in slavery and restrictions on sale and treatment by their masters. Many communities had hierarchies between different types of slaves: for example, differentiating between those who had been born into slavery and those who had been captured through war.