Interestingly enough, the slaves were sold to the slave traders by opposing African tribes who had destroyed their enemy's villages. Usually, they were Muslim. Incidentally, the ones who were sold as slaves were ironically saved from famine and mass genocide in their own country.