Islamic views on slavery

Islamic views on slavery represent a complex and multifaceted body of Islamic thought, with various Islamic groups or thinkers espousing views on the matter which have been radically different throughout history. Slavery was a mainstay of life in pre-Islamic Arabia and surrounding lands. The Quran and the hadith (sayings of Muhammad) address slavery extensively, assuming its existence as part of society but viewing it as an exceptional condition and restricting its scope. Early Islamic dogma forbade enslavement of dhimmis, the free members of Islamic society, including non-Muslims and set out to regulate and improve the conditions of human bondage. Islamic law regarded as legal slaves only those non-Muslims who were imprisoned or bought beyond the borders of Islamic rule, or the sons and daughters of slaves already in captivity. In later classical Islamic law, the topic of slavery is covered at great length.

Slavery in Islamic law is not based on race or ethnicity. However, while there was no legal distinction between white European and black African slaves, in some Muslim societies they were employed in different roles. Slaves in Islam were mostly assigned to the service sector, including as concubines, cooks, and porters. There were also those who were trained militarily, converted to Islam, and manumitted to serve as soldiers; this was the case with the Mamluks, who later managed to seize power by overthrowing their Muslim masters, the Ayyubids. In some cases, the harsh treatment of slaves also led to notable uprisings, such as the Zanj Rebellion. Bernard Lewis opines that in later times, the domestic slaves, although subjected to appalling privations from the time of their capture until their final destination, seemed to be treated reasonably well once they were placed in a family and to some extent accepted as members of the household.

The Muslim slave trade was most active in west Asia, eastern Europe and sub-Saharan Africa. Muslim traders exported as many as 17 million slaves to the coast of the Indian Ocean, the Middle East, and North Africa. Abolitionist movements began to grow during the 19th century, prompted by both Muslim reformers and diplomatic pressure from Britain. The first Muslim country to prohibit slavery was Tunisia, in 1846. During the 19th and early 20th centuries all large Muslim countries, whether independent or under colonial rule, banned the slave trade and/or slavery. The Dutch East Indies abolished slavery in 1860, while British India abolished slavery in 1862. The Ottoman Empire banned the African slave trade in 1857 and the Circassian slave trade in 1908, while Egypt abolished slavery in 1895, Afghanistan in 1921 and Persia in 1929. In some Muslim countries in the Arabian peninsula and Africa, slavery was abolished in the second half of the 20th century: 1962 in Saudi Arabia and Yemen, Oman in 1970, Mauritania in 1981. However, slavery has been documented in recent years, despite its illegality, in Muslim-majority countries in Africa including Chad, Mauritania, Niger, Mali, and Sudan.

Many early converts to Islam were the poor and former slaves. One notable example is Bilal ibn Rabah al-Habashi.

Slavery in pre-Islamic Arabia
Slavery was widely practiced in pre-Islamic Arabia, as well as in the rest of the ancient and early medieval world. The minority were white slaves of foreign extraction, likely brought in by Arab caravaners (or the product of Bedouin captures) stretching back to biblical times. Native Arab slaves had also existed, a prime example being Zayd ibn Harithah, later to become Muhammad's adopted son. Arab slaves, however, usually obtained as captives, were generally ransomed off amongst nomad tribes. The slave population increased by the custom of child abandonment (see also infanticide), and by the kidnapping, or, occasionally, the sale of small children. There is no conclusive evidence of the existence of enslavement for debt or the sale of children by their families; the late and rare accounts of such occurrences show them to be abnormal, Brunschvig states (According to Brockopp, debt slavery was persistent. ) Free persons could sell their offspring, or even themselves, into slavery. Enslavement was also possible as a consequence of committing certain offenses against the law, as in the Roman Empire.

Two classes of slave existed: a purchased slave, and a slave born in the master's home. Over the latter the master had complete rights of ownership, though these slaves were unlikely to be sold or disposed of by the master. Female slaves were at times forced into prostitution for the benefit of their masters, in accordance with Near Eastern customs.

The historical accounts of the early years of Islam report that "slaves of non-Muslim masters ... suffered brutal punishments. Sumayyah bint Khayyat is famous as the first martyr of Islam, having been killed with a spear by Abū Jahl when she refused to give up her faith. Abu Bakr freed Bilal when his master, Umayya ibn Khalaf, placed a heavy rock on his chest in an attempt to force his conversion."

There were many common features between the institution of slavery in the Quran and that of pre-Islamic culture. However, the Quranic institution had some unique new features. According to Brockopp, the idea of using alms for the manumission of slaves who had converted to Islam appears to be unique to the Quran. Islam also prohibits the use of female slaves for prostitution which was common in pre-Islamic history.

Brockopp states that the Qur'an was a progressive legislation on slavery in its time because it encouraged proper treatment. Others state that Islam's record with slavery has been mixed, progressive in Arabian lands, but it increased slavery and worsened abuse as Muslim armies attacked people in Africa, Europe and Asia. Murray notes that Quran sanctified the institution of slavery and abuses therein, but to its credit did not freeze the status of a slave and allowed a means to a slave's manumission in some cases when the slave converted to Islam.

Quran
"Alms-tax is only for the poor and the needy, for those employed to administer it, for those whose hearts are attracted ˹to the faith˺, for ˹freeing˺ slaves, for those in debt, for Allah’s cause, and for ˹needy˺ travellers. ˹This is˺ an obligation from Allah. And Allah is All-Knowing, All-Wise."

The Quran contains a number of verses aimed at regulating slavery and mitigating its negative impact. It calls for the manumission (freeing) of slaves. It prescribes kindness towards slaves. Slaves are considered morally equal to free persons, however, they have a lower legal standing. All Quranic rules on slaves are emancipatory in that they improve the rights of slaves compared to what was already practiced in the 7th century. Many Muslims have interpreted Quran as gradually phasing out slavery.

The Quran calls for the freeing of slaves, either the owner manumitting the slave, or a third party purchasing and freeing the slave. The freeing of slaves is encouraged as an act of benevolence, and expiation of sins. devises a manumission contract in which slaves buy their freedom in installments. Two other verses encourage believers to help slaves pay for such contracts. One of the uses of zakat, a pillar of Islam, is to pay for the freeing of slaves.

The Quran prescribes kind treatment of slaves. Verse calls for good treatment to slaves. The Quran recognizes the humanity of slaves, by calling them "believers", recognizing their desire to be free, and recognizing female slaves' aversion to prostitution. Several verses list slaves as members of the household, sometimes alongside wives, children and other relatives.

The Quran recognizes slaves as morally and spiritually equal to free people. God promises an eternal life in the Hereafter. This equality is indicated in, which addresses free people and slaves as “the one of you is as the other” (ba'dukum min ba'din). refers to master and slave with the same word. However, slaves are not accorded the same legal standing as the free. Slaves are considered as minors for whom the owner is responsible. The punishment for crimes committed by slaves is half the punishment as to be meted out on free persons. The legal distinction between slaves and the free is regarded as the divinely established order of things, which is seen as part of God's grace.

The Quran recognizes slavery as a source of injustice, as it places the freeing of slaves on the same level as feeding the poor. Nevertheless, the Quran doesn't abolish slavery. One reason given is that slavery was a major part of the 7th century socioeconomic system, and it abolishing it would not have been practical. Most interpretations of the Quran agree that the Quran envisions an ideal society as one in which slavery no longer exists.

Slaves are mentioned in at least twenty-nine verses of the Quran, most of these are Medinan and refer to the legal status of slaves. The legal material on slavery in the Quran is largely restricted to manumission and sexual relations. The Quran permits owners to take slaves as concubines, though it promotes abstinence as the better choice. It strictly prohibits slave prostitution. According to Sikainga, the Quranic references to slavery as mainly contain "broad and general propositions of an ethical nature rather than specific legal formulations." The word 'abd' (slave) is rarely used, being more commonly replaced by some periphrasis such as ma malakat aymanukum ("that which your right hands own"). However the meaning and translation of this term has been disputed. Ghulam Ahmed Pervez argued that the term is used in the past-tense in the Quran, thus signalling only those individuals who were already enslaved at the dawn of Islam. This slight change in tense is significant, as it allowed Parwez to argue that slavery was never compatible with the commandments of the Quran and is in fact outlawed by Quranic Law.

There are many common features between the institution of slavery in the Quran and that of neighboring cultures. However, the Quranic institution had some unique new features. Bernard Lewis states that the Quranic legislation brought two major changes to ancient slavery which were to have far-reaching effects: presumption of freedom, and the ban on the enslavement of free persons except in strictly defined circumstances. According to Brockopp, the idea of using alms for the manumission of slaves appears to be unique to the Quran, assuming the traditional interpretation of verses and. Similarly, the practice of freeing slaves in atonement for certain sins appears to be introduced by the Quran (but compare Exodus 21:26-7). The forced prostitution of female slaves, a long practiced custom in the Near Eastern, is condemned in the Quran. Murray Gordon notes that this ban is "of no small significance." Brockopp writes: "Other cultures limit a master's right to harm a slave but few exhort masters to treat their slaves kindly, and the placement of slaves in the same category as other weak members of society who deserve protection is unknown outside the Quran. The unique contribution of the Quran, then, is to be found in its emphasis on the place of slaves in society and society's responsibility toward the slave, perhaps the most progressive legislation on slavery in its time."

Ma malakat aymanuhum
The most common term in the Qur'an to refer to slaves is the expression ma malakat aymanuhum or milk al-yamin in short, meaning "those whom your right hands possess". This term is found in 15 Quranic passages, making it the most common term for slaves. The Qur'an refers to slaves very differently than classical Arabic: whereas the most common Arabic term for slave is ‘abd, the Qur'an instead uses that term in sense of "servant of God", and raqiq (another Arabic term for slave) is not found in the Qur'an. Thus, this term is a Qur'anic innovation. The term can be seen as an honorific, as to be held by "the right hands" means to be held in honor in Arabic and Islamic culture, a fact that can be seen in Quranic verses that refer to those who will enter Paradise as "companions of the right hand." The term also implies that slaves are "possessions". In four places, the Qur'an addresses slaves in the same terms as the free; for example, Q39:29 refers to both the master and the slave using the same word (rajul).

Ghulam Ahmed Pervez and Amir Ali have argued that the expression ma malakat aymanukum should be properly read in the past tense, thus only referring to people already enslaved at the time the Qur'an was revealed.

Prophet's traditions


The corpus of hadith attributed to Muhammad follows the general lines of Quranic teaching on slavery and contains a large store of reports enjoining kindness toward slaves.

Some modern Muslim authors have interpreted this as an indication that Muhammad envisioned a gradual abolition of slavery, while Murray Gordon characterizes Muhammad's approach to slavery as reformist rather than revolutionary. He did not set out to abolish slavery, but rather to improve the conditions of slaves by urging his followers to treat their slaves humanely and free them as a way of expiating one's sins. According to sahih (authentic) hadith Muhammad encouraged gifting of slaves to be a better alternative to setting them free. When the people of Banu Qurayzah were defeated, he ordered some of the captives to be exchanged to purchase horses and arms. Gordon argues that Muhammad instead assured the legitimacy of slavery in Islam by lending it his moral authority. Likely justifications for his attitude toward slavery included the precedent of Jewish and Christian teachings of his time as well as pragmatic considerations.

The most notable of Muhammad's slaves were: Safiyya bint Huyayy received in exchange for seven other slaves, whom he freed and married; Maria al-Qibtiyya, given to Muhammad by a Sassanid official, who gave birth to his son Ibrahim and was freed. Sirin, Maria's sister, whom he freed and married to the poet Hassan ibn Thabit and Zayd ibn Harithah, whom Muhammad freed and adopted as a son.

Source of slaves
Traditional Islamic jurisprudence presumed everyone was free under the dictum of The basic principle is liberty (al-'asl huwa 'l-hurriya), and slavery was an exceptional condition. Any person whose status was unknown (e.g. a foundling) was presumed to be free. A free person could not sell himself or his children into slavery. Neither could a free person be enslaved due to debt or as punishment for a crime. Non-Muslims living under Muslim rule, known as dhimmi, could not be enslaved. Lawful enslavement was restricted to two instances: capture in war (on the condition that the prisoner is not a Muslim), or birth in slavery. Islamic law did not recognize the classes of slave from pre-Islamic Arabia including those sold or given into slavery by themselves and others, and those indebted into slavery. Though a free Muslim could not be enslaved, conversion to Islam by a non-Muslim slave did not require that he or she then should be liberated. Slave status was not affected by conversion to Islam. Purchasing slaves and receiving slaves as tribute was permitted. Many scholars subjected slave purchases to the condition that slave should have been "rightfully enslaved" in the first place.

Treatment
In the instance of illness it would be required for the slave to be looked after. Manumission is considered a meritorious act. Based on the Quranic verse (24:33), Islamic law permits a slave to ransom himself upon consent of his master through a contract known as mukataba. Azizah Y. al-Hibri, a professor of Law specializing in Islamic jurisprudence, states that both the Quran and Hadith are repeatedly exhorting Muslims to treat their slaves well and that Muhammad showed this both in action and in words. Levy concurs, adding that "cruelty to them was forbidden." Al-Hibri quotes the famous last speech of Muhammad and other hadiths emphasizing that all believers, whether free or enslaved, are siblings. Lewis explains, "the humanitarian tendency of the Quran and the early caliphs in the Islamic empire, was to some extent counteracted by other influences," notably the practice of various conquered people and countries Muslims encountered, especially in provinces previously under Roman law. In spite of this, Lewis also states, "Islamic practice still represented a vast improvement on that inherited from antiquity, from Rome, and from Byzantium." Murray Gordon writes: "It was not surprising that Muhammad, who accepted the existing socio-political order, looked upon slavery as part of the natural order of things. His approach to what was already an age-old institution was reformist and not revolutionary. The Prophet had not in mind to bring about the abolition of slavery. Rather, his purpose was to improve the conditions of slaves by correcting abuses and appealing to the conscience of his followers to treat them humanely. The adoption of slaves as members of the family was common, according to Levy. If a slave was born and brought up in the master's household he was never sold, except in exceptional circumstances.

Sexual intercourse
Surah 23, Al-Muminun, of the Quran in verse 6 and Surah 70, Al-Maarij, in verse 30 both, in identical wording, draw a distinction between spouses and "those whom one's right hands possess", saying " أَزْوَاجِهِمْ أَوْ مَا مَلَكَتْ أَيْمَانُهُمْ" (literally, "their spouses or what their right hands possess"), while clarifying that sexual intercourse with either is permissible. Sayyid Abul Ala Maududi explains that "two categories of women have been excluded from the general command of guarding the private parts: (a) wives, (b) women who are legally in one's possession". Islamic law, using the term Ma malakat aymanukum ("what your right hands possess") considered sexual relations with female slaves as lawful.

Slave women were required mainly as concubines and domestic workers. A Muslim slaveholder was entitled by law to the sexual enjoyment of his slave women. The concept of consent from the slave women was absent from early Islamic jurisprudence, as discussed heavily in books Marriage and Slavery in Early Islam by Professor Kecia Ali and Slavery and Islam by Professor Jonathon A.C. Brown. While free women might own male slaves, they had no such right; the Quran never mentions a situation when a female master might have sex with her male slave. The property of a slave was owned by his or her master unless a contract of freedom of the slave had been entered into, which allowed the slave to earn money to purchase his or her freedom and similarly to pay bride wealth. The marriage of slaves required the consent of the owner. Under the Hanafi and Shafi'i schools of jurisprudence male slaves could marry two wives, but the Maliki permitted them to marry four wives like the free men. According to the Islamic law, a male slave could marry a free woman but this was discouraged in practice. Islam permits sexual relations between a male master and his female slave outside marriage. This is referred to in the Quran as ma malakat aymanukum or "what your right hands possess". There are some restrictions on the master; he may not co-habit with a female slave belonging to his wife, neither can he have relations with a female slave if she is co-owned, or already married.

In ancient Arabian custom, the child of a freeman by his slave was also a slave unless he was recognized and liberated by his father. In theory, the recognition by a master of his offspring by a slave woman was optional in Islamic society, and in the early period was often withheld. By the High Middle Ages it became normal and was unremarkable in a society where the sovereigns themselves were almost invariably the children of slave concubines. The mother receives the title of "umm walad" (lit. 'mother of a child'), which is an improvement in her status as she can no longer be sold. Among Sunnis, she is automatically freed upon her master's death, however for Shi'a, she is only freed if her child is still alive; her value is then deducted from this child's share of the inheritance. Lovejoy writes that as an umm walad, they attained "an intermediate position between slave and free" pending their freedom, although they would sometimes be nominally freed as soon as they gave birth.

There is no limit on the number of female concubines a male master may possess. However, the general marital laws are to be observed, such as not having sexual relations with the sister of a female slave. In Islam "men are enjoined to marry free women in the first instance, but if they cannot afford the bridewealth for free women, they are told to marry slave women rather than engage in wrongful acts." One rationale given for recognition of concubinage in Islam is that "it satisfied the sexual desire of the female slaves and thereby prevented the spread of immorality in the Muslim community." A slave master could have sex with his female slave only while she was not married. This attempt to require sexual exclusivity for female slaves was rare in antiquity, when female slaves generally had no claim to an exclusive sexual relationship. According to Sikainga, "in reality, however, female slaves in many Muslim societies were prey for members of their owners' household, their neighbors, and their guests."

In Shiite jurisprudence, it is unlawful for a master of a female slave to grant a third party the use of her for sexual relations. The Shiite scholar Shaykh al-Tusi stated: ولا يجوز إعارتها للاستمتاع بها لأن البضع لا يستباح بالإعارة "It is not permissible to loan (the slave girl) for enjoyment purpose, because sexual intercourse cannot be legitimate through loaning" and the Shiite scholars al-Muhaqiq al-Kurki, Allamah Al-Hilli and Ali Asghar Merwarid made the following ruling: ولا تجوز استعارة الجواري للاستمتاع "It is not permissible to loan the slave girl for the purpose of sexual intercourse"

Under the legal doctrine of kafa'a (lit."efficiency"), the purpose of which was to ensure that a man should be at least the social equal of the woman he marries, a freedman is not as good as the son of a freedman, and he in turn not as good as the grandson of a freedman. This principle is pursued up to three generations, after which all Muslims are deemed equally free. Lewis asserts that since kafa'a "does not forbid unequal marriages", it is in no sense a "Muslim equivalent of Nuremberg Laws of Nazi Germany or the apartheid laws of South Africa. His purpose, he states, is not to try to set up a moral competition - to compare castration and apartheid as offenses against humanity."

Legal status
Within Islamic jurisprudence, slaves were excluded from religious office and from any office involving jurisdiction over others. Freed slaves are able to occupy any office within the Islamic government, and instances of this in history include the Mamluk who ruled Egypt for almost 260 years and the eunuchs who have held military and administrative positions of note. With the permission of their owners they are able to marry. Annemarie Schimmel, a contemporary scholar on Islamic civilization, asserts that because the status of slaves under Islam could only be obtained through either being a prisoner of war (this was soon restricted only to infidels captured in a holy war) or born from slave parents, slavery would be theoretically abolished with the expansion of Islam. Fazlur Rahman agrees, stating that the Quranic acceptance of the institution of slavery on the legal plane was the only practical option available at the time of Muhammad since "slavery was ingrained in the structure of society, and its overnight wholesale liquidation would have created problems which it would have been absolutely impossible to solve, and only a dreamer could have issued such a visionary statement." Islam's reforms stipulating the conditions of enslavement seriously limited the supply of new slaves. Murray Gordon does note: "Muhammad took pains in urging the faithful to free their slaves as a way of expiating their sins. Some Muslim scholars have taken this mean that his true motive was to bring about a gradual elimination of slavery. An alternative argument is that by lending the moral authority of Islam to slavery, Muhammad assured its legitimacy. Thus, in lightening the fetter, he riveted it ever more firmly in place." In the early days of Islam, a plentiful supply of new slaves were brought due to rapid conquest and expansion. But as the frontiers were gradually stabilized, this supply dwindled to a mere trickle. The prisoners of later wars between Muslims and Christians were commonly ransomed or exchanged.

According to Lewis, this reduction resulted in Arabs who wanted slaves having to look elsewhere to avoid the restrictions in the Quran, meaning an increase of importing of slaves from non-Muslim lands, primarily from Africa. These slaves suffered a high death toll. Patrick Manning states that Islamic legislations against the abuse of the slaves convincingly limited the extent of enslavement in the Arabian Peninsula and to a lesser degree for the whole area of the Umayyad Caliphate where slavery had existed since the most ancient times. However, he also notes that with the passage of time and the extension of Islam, Islam, by recognizing and codifying slavery, seems to have done more to protect and expand slavery than the reverse.

In theory, free-born Muslims could not be enslaved, and the only way that a non-Muslim could be enslaved was being captured in the course of holy war. (In early Islam, neither a Muslim nor a Christian or Jew could be enslaved. Slavery was also perceived as a means of converting non-Muslims to Islam: A task of the masters was religious instruction. Conversion and assimilation into the society of the master didn't automatically lead to emancipation, though there was normally some guarantee of better treatment and was deemed a prerequisite for emancipation. The majority of Sunni authorities approved the manumission of all the "People of the Book". According to some jurists -especially among the Shi'a- only Muslim slaves should be liberated. In practice, traditional propagators of Islam in Africa often revealed a cautious attitude towards proselytizing because of its effect in reducing the potential reservoir of slaves.

Rights and restrictions
"Morally as well as physically the slave is regarded in law as an inferior being," Levy writes. Under Islamic law, a slave possesses a composite quality of being both a person and a possession. The slave is entitled to receive sustenance from the master, which includes shelter, food, clothing, and medical attention. It is a requirement for this sustenance to be of the same standard generally found in the locality and it is also recommended for the slave to have the same standard of food and clothing as the master. If the master refuses to provide the required sustenance, the slave may complain to a judge, who may then penalize the master through sale of her or his goods as necessary for the slave's keep. If the master does not have sufficient wealth to facilitate this, she or he must either sell, hire out, or manumit the slave as ordered. Slaves also have the right to a period of rest during the hottest parts of the day during the summer.

The spiritual status of a Muslim slave was identical to a Muslim free person, with some exemptions made for the slave. For example, it is not mandatory for Muslim slaves to attend Friday prayers or go for Hajj, even though both are mandatory for free Muslims. Slaves were generally allowed to become an imam and lead prayer, and many scholars even allowed them to act as an imam for Friday and Eid prayers, though some disagreed.

Evidence from slaves is rarely viable in a court of law. According to the most popular Sharia manual by Imam Shafi, the very first requirement for a legal testimony to be acceptable from a witness is that the witness must be free. As slaves are regarded as inferior in Islamic law, death at the hands of a free man does not require that the latter be killed in retaliation. The killer must pay the slave's master compensation equivalent to the slave's value, as opposed to blood-money. At the same time, slaves themselves possess a lessened responsibility for their actions, and receive half the penalty required upon a free man. For example: where a free man would be subject to a hundred lashes due to pre-marital relations, a slave would be subject to only fifty. Slaves are allowed to marry only with the owner's consent. Jurists differ over how many wives a slave may possess, with the Hanafi and Shafi'i schools allowing them two, and the Maliki school allowing four. Slaves are not permitted to possess or inherit property, or conduct independent business, and may conduct financial dealings only as a representative of the master. Offices of authority are generally not permitted for slaves, though a slave may act as the leader (Imam) in the congregational prayers, and he may also act as a subordinate officer in the governmental department of revenue. Masters may sell, bequeath, give away, pledge, hire out or compel them to earn money.

By the view of some madh'hab (but not others), a master may compel his slave to marry and determine the identity of the marriage partner.

The mahr that is given for marriage to a female slave is taken by her owner, whereas all other women possess it absolutely for themselves.

A slave was not allowed to become a judge, but could become a subordinate officer.

Manumission and abolition
The Quran and Hadith, the primary Islamic texts, make it a praiseworthy act for masters to set their slaves free. There are numerous ways in Islamic law under which a slave may become free:
 * An act of piety by the owner.
 * the mukataba contract: the slave and master draw a contract whereby the master will grant the slave freedom in exchange for a period of employment, or a certain sum of money (payable in installments). The master must allow the slave to earn money. Such a contract is recommended by the Qur'an.
 * A female slave who gives birth to her owner's child becomes an umm walad and becomes automatically free upon the death of her owner. The child would be automatically free and equal to the owner's other children.
 * The owner can promise, either verbally or in writing that the slave is free upon the owner's death. Such a slave is known as a mudabbar.
 * A Muslim who has committed certain sins, such as involuntary manslaughter or perjury, is required to free a slave as an expiation.
 * Anytime the owner of the slave declares the slave to be free the slave becomes automatically free, even if the owner made the statement accidentally or jokingly. For example, if a slave owner said "You’re free once you’ve finished this task", intending to mean "you’re done with work for the day", the slave would become free despite the owner's ambiguous statement.
 * A slave is freed automatically if it is discovered the slave is related to the master; this could happen, for example, when someone purchases a slave who happens to be a relative.

Gordon opines that while Islamic jurisprudence considered manumission as one way of atonement of sin, but other means of atonement also existed: for example, giving charity to the poor was considered superior to freeing a slave. And while Islam made freeing a slave a meritorious act, it was usually not a requirement, making it possible for a devout Muslim to still own a slave. Richard Francis Burton stated that sometimes slaves refused freedom due to lack of employable skills, as freedom from the master meant the slave might go hungry.

According to Jafar as-Sadiq, all Muslim slaves become automatically free after a maximum of 7 years in servitude. This rule applies regardless of the will of the owner.

Some scholars hold that the abolition of slavery was one of the aims of Islam, a view that Islamic feminists scholar Kecia Ali finds well intentioned but ahistorical and simplistic. She suggest that while there was definitely an "emancipatory ethic" (encouragement for freeing slaves) in Islamic jurisprudence and that "it is possible to view slavery as inconsistent with basic Qur'anic precepts of justice and human equality before God", slavery was also "marginal to the Qur'anic worldview" and "there has not been a strong internally developed critique of past or present slaveholding practices". The subsequent shift in attitudes within Islam towards slavery have also been compared to similar shifts within Christianity towards Biblically sanctioned slavery, which was widespread in the late antique world in which both the Bible and Quran arose.

Abolitionism
In the Ottoman Empire, restrictions on the slave trade began to be introduced during the eighteenth century, in the context of Ottoman-Russian warfare. Bilateral agreements between the Ottoman and Russian empires enabled both sides to retrieve captives taken during war in return for ransom payments. Ransoming of enslaved war captives had been common before this, but had depended on the agreement of a captive's owner; by establishing this as a legal right, the agreements restricted the rights of slaveowners and contributed to the development of the international law concept of "prisoner of war." The abolitionist movement starting in the late 18th century in Western Europe led to gradual changes concerning the institution of slavery in Muslim lands both in doctrine and in practice. One of the first religious decrees comes from the two highest dignitaries of the Hanafi and Maliki rites in the Ottoman Empire. These religious authorities declared that slavery is lawful in principle but it is regrettable in its consequences. They expressed two religious considerations in their support for abolition of slavery: "the initial enslaving of the people concerned comes under suspicion of illegality by reason of the present-day expansion of Islam in their countries; masters no longer comply with the rules of good treatment which regulate their rights and shelter them from wrong-doing."

According to Brunschvig, although the total abolition of slavery might seem a reprehensible innovation and contrary to the Quran and the practice of early Muslims, the realities of the modern world caused a "discernible evolution in the thought of many educated Muslims before the end of the 19th century." These Muslims argued that Islam on the whole has "bestowed an exceptionally favorable lot on the victims of slavery" and that the institution of slavery is linked to the particular economic and social stage in which Islam originated. According to the influential thesis of Ameer Ali, the Qur’an disapproved of slavery, but Muhammad could not abolish the institution overnight as it would have disrupted society and economy. The Prophet thus ordered an immediate betterment in the status and treatment of slaves, and encouraged manumission, trusting that slavery would soon die out. Tunisia was the first Muslim country to abolish slavery, in 1846. Tunisian reformers argued for the abolition of slavery on the basis of Islamic law. They argued that while Islamic law permitted slavery, it set many conditions, and these conditions were impossible to enforce in the 19th century and widely flouted. They pointed to evidence that many slaves sold in Tunisian markets had been enslaved illegally, as they were either Muslim or the subject of a friendly state at the time of capture (Islamic law allowed the enslavement only of non-Muslims in the course of war). They also argued that the circumstances for legal enslavement in the 19th century were very rare, because Tunisia and other Muslim states were not permanently at war with non-Muslim powers, as the first Muslim state had been. Therefore, one could assume that the vast majority of the 19th-century slave trade was illegal, and the only way to prevent illegal enslavement was to prohibit the slave trade entirely. Furthermore, since the child of a slave and a free man was considered free, the institution of slavery was not sustainable without a slave trade. By the early 20th century, the idea that Islam only tolerated slavery due to necessity was to varying extent taken up by the Ulema.

According to Brockopp, in the Ottoman Empire and elsewhere the manumission contract (kitaba) was used by the state to give slaves the means to buy their freedom and thereby end slavery as an institution. Some authorities issued condemnations of slavery, stating that it violated Quranic ideals of equality and freedom. Subsequently, even religious conservatives came to accept that slavery was contrary to Islamic principles of justice and equality.

Contemporary
By the 1950s–1960s, a majority of Muslims had accepted the abolition of slavery as religiously legitimate. Islam as a whole has never preached the freedom of all men "as a doctrine" up to the current day. However, by the end of the 20th century, all Muslim countries had made slavery illegal, and the vast majority of Muslim organizations and interpretations of sharia firmly condemn modern-day slavery. In 1926, the Muslim World Conference meeting in Mecca condemned slavery. Proceedings from an Organization of Islamic Conference meeting in 1980 upheld human freedom and rejected enslavement of prisoners. Most Muslim scholars consider slavery to be inconsistent with Quranic principles of justice. Bernard Freamon writes that there is consensus (ijma) among Muslim jurists that slavery has now become forbidden. However, certain contemporary clerics still consider slavery to be lawful, such Saleh Al-Fawzan of Saudi Arabia.

Sayyid Qutb (1906-1966) wrote in Fi Zilal al-Quran (a tafsir) that slavery was adopted by Islam at a time it was practiced world-wide for a period of time "until the world devised a new code of practise during war other than enslavement." Qutb's brother, Muhammad Qutb, contrasted sexual relations between Muslim slave-owners and their female slaves with what he saw as the widespread practice of pre-marital sex in Europe.

Abul A'la Maududi (1903-1979) wrote: "Islam has clearly and categorically forbidden the primitive practice of capturing a free man, to make him a slave or to sell him into slavery. On this point the clear and unequivocal words of Muhammad are as follows:'There are three categories of people against whom I shall myself be a plaintiff on the Day of Judgement. Of these three, one is he who enslaves a free man, then sells him and eats this money' (al-Bukhari and Ibn Majjah)." The words of this Tradition of the Prophet are also general, they have not been qualified or made applicable to a particular nation, race, country or followers of a particular religion. ... After this the only form of slavery which was left in Islamic society was the prisoners of war, who were captured on the battlefield. These prisoners of war were retained by the Muslim Government until their government agreed to receive them back in exchange for Muslim soldiers captured by them ...

William Clarence-Smith criticized the above two as: "dogged refusal of Mawlana Mawdudi to give up on slavery" and the notable "evasions and silences of Muhammad Qutb".

Taqiuddin al-Nabhani, a shariah judge and founder of Hizb ut-Tahrir movement, gives the following explanation: "When Islam came, for the situations where people were taken into slavery (e.g. debt), Islam imposed Shari’ah solutions to those situations other than slavery. ... It (Islam) made the existing slave and owner form a business contract, based upon the freedom, not upon slavery ...  As for the situation of war, ...  it clarified the rule of the captive in that either they are favoured by releasing without any exchange, or they are ransomed for money or exchanged for Muslims or non-Muslim citizens of the Caliphate." The website of the organization stresses that because sharia historically was responding to a contract, not the institution of slavery, a future caliphate could not re-introduce slavery.

In 2014, ayatollah Mohammad Taqi al-Modarresi met with Pope Francis and other religious leaders to draft an inter-faith declaration to "eradicate modern slavery across the world by 2020 and for all time." The declaration was signed by other Shi'ite leaders and the Sunni Grand Imam of Al Azhar. In 1993, ayatollah Mohammad-Taqi Mesbah-Yazdi declared that "Islam has devised solutions and strategies for ending slavery, but that does not mean that slavery is condemned in Islam". He argued that ordinances of slavery could apply to prisoners of war. Iranian ayatollah Mohsen Kadivar has used an Islamic legal technique called naskh aqli (abrogation by reason) to conclude that slavery is no longer permissible in Islam.

In response to the Nigerian extremist group Boko Haram's Quranic justification for kidnapping and enslaving people, and ISIL's religious justification for enslaving Yazidi women as spoils of war as claimed in their digital magazine Dabiq,   126 Islamic scholars from around the Muslim world, in late September 2014, signed an open letter to the Islamic State's leader Abu Bakr al-Baghdadi, rejecting his group's interpretations of the Quran and hadith to justify its actions. The letter accuses the group of instigating fitna – sedition – by instituting slavery under its rule in contravention of the anti-slavery consensus of the Islamic scholarly community.

Notable enslaved people and freedmen
• Bilal ibn Rabah

• Ammar ibn Yasir

• Suhayb the Roman

• Ata ibn Abi Rabah

• Wahshi ibn Harb

• Malik Ambar

• Alam al-Malika

• Qutuz

• Baibars

• Qutb al-Din Aibak

• Iltutmish

• Malik Kafur