A useful analogy is slavery. Islam improved the position of slaves compared to their status in pre-Islamic societies, and the Koran encourages the freeing of slaves as a meritorious act. At the same time, Muhammad himself had many slaves, and Islamic law unmistakably accepts slavery. Indeed, Saudi Arabia abolished slavery only in 1962, and Mauritania in 1981.

