Translated by Zameelur Rahman

It behooves us, before commencing on the commentary of the hadiths on the emancipation of slaves, to produce here a short essay in which we discuss the reality of slavery and its place in Islam, because a lot of commotion has been caused amongst the Muslims by the westerners and their devotees for allowing slavery, and the people of this age claim it is a blemish on the forehead of religion and a reason to doubt Islam. And there is no power, nor might, except with Allah, the Mighty, the Great.

The cause of the error in this respect is that the westerners and their devotees analogise the slaves of Islam to the slaves of Greece, Rome and Europe who would live in the utmost debasement, difficulty and desolation. Their humanity was not recognised and no rights were afforded them and they hadn’t the slightest share in social intercourse.

The truth is that the slave in Islam differs from these slaves completely, and we ought to begin this study with the testimony of a well-known European Orientalist, Professor Gustave Le Bon, who wrote in his famous book known as The Civilisation of the Arabs:

When the word slavery is spoken to a European who is accustomed to reading American novels written over the last thirty years, he pictures the exploitation of those poor people shackled in iron chains, driven by whips; people who were barely fed enough to keep them alive, and were made to live in dingy cabins. It does not concern me whether this description is authentic and accords with the reality of what occurred from the English in America over a few short years, and whether it was even conceivable for a slave-owner to entertain the idea of mistreating them and making them suffer torture and humiliation since that will result in the loss of a valuable commodity which the negro was at that time. But there is no doubt the picture of slavery in Islam is absolutely different from the picture of slavery in Christianity.

Once this has been settled, know that Islam came, and slavery was widespread in the eastern and western parts of the globe, and slaves were treated with harshness and debasement for which the forehead of humanity drips [with sweat], so it was from the wisdom of Islam that it did not prohibit slavery completely, nor did it render it totally void, but it legislated rules for it and made boundaries for it in a way that made it contribute to human wellbeing and the development of human society.

Thus, Islam allowed the taking of slaves with the condition that it is in a jihad sanctioned by the Shari‘ah against the disbelievers. So while the Romans would force people into slavery because of committing some crimes, and while they would put the children of slave women into slavery, apart from the captives of wars, Islam announced that it is not permissible to put anyone into slavery except in a jihad sanctioned by the Shari‘ah. Furthermore, slavery is not the only option for a captive of a jihad sanctioned by the Shari‘ah. Rather, the Imam has four options with respect to them: either he orders their execution or puts them into slavery, or he frees them by taking ransom or he shows favour on them so releases them without taking anything [in return]. Thus, taking slaves is not something necessary in Islam. Rather, it is one of four options. That is because the matter of war is a multifaceted matter, and sometimes situations arise therein in which nothing is suitable besides taking slaves because if we executed all the captives there would be wastage of human power, and were we to free them in totality, that would encourage disbelief and encourage disbelievers to commit acts of aggression against the Muslims; and were we to imprison them for the entire period of their lives that would waste their talents and waste wealth on them without any benefit returning to the society. As for taking slaves – with its conditions and its limits – it is free from this and that, for in it is preservation of the human species and nurturing him with an Islamic nurturing, and strengthening it by employing the talents of the slaves for the wellbeing of the society. This is why Islam has left four doors open for the Imam to select from them what is appropriate to the situations and fitting to the conditions.

Moreover, Islam has afforded slaves rights that have no precedent in any other religion. Thus, He (Exalted is He) said: “And be good to parents and to kinsmen and orphans and the needy and the close neighbour and the distant neighbour and the companion at your side and the wayfarer and to what your right hands possess [i.e. your slaves]. Surely, Allah does not like those who are arrogant, proud.” (4:36)

The Messenger of Allah (Allah bless him and grant him peace) said: “Your brothers, your servants, Allah has placed them under your authority. So whoever’s brother is under his authority, he should feed him from what he eats and clothe him from what he wears. Do not burden them with what overpowers them, and if you burden them, help them.” Al-Bukhari transmitted it in Kitab al-Iman, Bab al-Ma‘asi min Amr al-Jahiliyyah (1:9) and in Kitab al-‘Itq, Bab Qawl al-Nabi al-‘Abid Ikhwanukum (1:346).

And he said: “The one who is harsh to his slaves will not enter paradise.” They said: “O Messenger of Allah! Did you not inform us that this ummah is the ummah with the most slaves and orphans?” He said: “Yes! So honour them as you honour your children and feed them from what you eat…” Ibn Majah transmitted it in Kitab al-Adab, Bab al-Ihsan ila al-Mamalik (1:271). And he (Allah bless him and grant him peace) said: “Whoever slaps his slave or strikes him, its compensation is to free him.” Abu Dawud transmitted it in Kitab al-Adab, Bab Haqq al-Mamluk (2:703).

It was from the intense concern of the Messenger of Allah (Allah bless him and grant him peace) for slaves that the last word he spoke before his death was encouragement towards fulfilment of their rights. Thus, Anas ibn Malik (Allah be pleased with him) narrates: “The general will of the Messenger of Allah (Allah bless him and grant him peace) when death came to him and he was giving up his soul was: ‘[Be steadfast on] prayer, and [take care of] what your right hands possess.’” Ibn Majah transmitted it in Abwab al-Wasaya (1:198), and he transmitted from ‘Ali ibn Abi Talib (Allah be pleased with him): “The last statement of the Prophet (Allah bless him and grant him peace) was: ‘[Be steadfast on] prayer, and [take care of] what your right hands possess.’” Abu Dawud also transmitted it in al-Adab, Bab Haqq al-Mamluk (2:701), and his wording is: “[Be observant of] Salah, [be observant of] Salah! And fear Allah in what your right hands possess.”

Such hadiths are plenty. There isn’t enough space here to exhaust them. In sum, Islam changed the system of slavery in a manner that made it one of mutual love and brotherhood, and nothing remained in Islam except the name of slavery. In fact, Islam even changed the name of slavery, in what Abu Hurayrah narrated that the Messenger of Allah (Allah bless him and grant him peace) said: “One of you should not say ‘my male slave’ or ‘my female slave’ and the slave should not say ‘my lord’ or ‘my lady.’ The owner should say ‘my boy’ and ‘my girl,’ and the slave should say ‘my master’ and ‘my mistress.’” Abu Dawud transmitted it in al-Adab, Bab la yaqul al-Mamluk Rabbi wa Rabbati (2:680).

These laws were not merely inserted in the insides of pages. Rather, the Muslims in every period from the periods of their history put them into practice, and would treat their slaves as they treat their own brothers. So how many a slave in the history of Islam reached – despite being a slave – the peak of glory and leadership, and how many a slave became a resource for the freemen in knowledge and gnosis, and how many a slave lived a life envied by freemen?! Indeed our history is full of such examples which are sufficient to prove that the laws of good social behaviour with slaves were not neglected in a period from the periods [of history]. Rather, they were living laws, on which the Islamic society acted, and from which the wisdom of Islam in permitting taking slaves shone forth. Whoever studies the books of rijal and the conditions of the narrators of hadith and the scholars, he finds that most of them were freed slaves. Hence, this is ‘Ata ibn Abi Rabah in Makkah, and Tawus ibn Kaysan in the Yemen, and Yazid ibn Habib in Egypt, Makhul in the Levant, al-Dahhak ibn Muzahim in the Hijaz; all of them were freed slaves, and all of them were in one period, and the leadership of knowledge and jurisprudence culminated in them in their lands.

Furthermore, Islam encourages freeing many slaves, along with the rights the slaves enjoy under its dominion. Thus it considers the freeing of prisoners a separate expenditure from the expenditures of Zakat, and it considers freeing slaves at the forefront of every compensation, such that it considers it a compensation for slapping the slave man and woman as has preceded, and it describes many virtues of emancipating slaves the like of which is not mentioned for other good deeds, and it considers it from those things that jesting in which is to be regarded as serious, and it orders making plenty of it at the time of solar and lunar eclipse, as al-Bukhari narrated in Bab ma Yustahabbu min al-‘Itaqah fi l-Kusuf.

This is why we see the Sahabah hastening towards freeing slaves, and seizing opportunities for it. Thus it was narrated that the Messenger of Allah (Allah bless him and grant him peace) gave Abu al-Haytham ibn al-Tayhan (Allah be pleased with him) a slave and he said: “Accept the advice of kindness to him.” Abu al-Haytham proceeded to his wife and informed her of the statement of the Messenger of Allah (Allah bless him and grant him peace), so she said: “You will not reach what the Prophet (Allah bless him and grant him peace) said about him unless you free him.” He said: “He is free.” Al-Tirmidhi transmitted it in Abwab al-Zuhd, Bab ma ja’a fi Ma‘ishat Ashab al-Nabi sallAllahu ‘alayhi wasallam.

And it is narrated from Abu Hurayrah (Allah be pleased with him) that when he came with the intention to accept Islam and he had with him a slave, they were each parted from the other. Afterwards, he came while Abu Hurayrah was sitting with the Prophet (Allah bless him and grant him peace), so the Prophet (Allah bless him and grant him peace) said: “O Abu Hurayrah! This is your slave who has come to you.” He said: “Take notice, verily I make you witness that he is free!” Al-Bukhari transmitted it in Bab idha qala li ‘abdihi huwa liLlahi wa nawa l-‘itq (1:343). And the Prophet (Allah bless him and grant him peace) gave Abu Dharr a slave, and he said: “Accept the advice of kindness to him,” so he freed him. Al-Bukhari transmitted it in al-Adab al-Mufrad, Bab al-‘Afw ‘an al-Khadim (no. 163).

Whenever Ibn ‘Umar became overly attracted to some form of wealth, he would take it [i.e. emancipating slaves] as a means of attaining closeness to Allah (Exalted is He), and his slaves would know this of him. Once, one of them stayed constantly in the mosque, so when Ibn ‘Umar saw him in that beautiful condition, he freed him. His companions said to him: “They are deceiving you.” He said: “Whoever deceives us by means of Allah we will fall prey to him.” Al-Nawawi narrated it in Tahdhib al-Asma’ wa l-Lughat (1:280), and Ibn Sa‘d transmitted it in the biography of Ibn ‘Umar in his Tabaqat (4:167). And from what is known about ‘Uthman (Allah be pleased with him) is that he would free a slave from the slaves every Friday.

Thus, these are a few examples from those beautiful incidents which adorn Islamic history, which we cannot exhaust in this place. We only cited them so a picture of the Islamic society may be gleaned. We should relate here what ‘Allamah al-Nawwab Siddiq Hasan Khan narrated from al-Najm al-Wahhaj that the Prophet (Allah bless him and grant him peace) freed 63 people, the number of years of his life, and he enumerated their names. He said:

And ‘A’ishah freed 69, and she lived for that number of years, and Abu Bakr freed many, and al-‘Abbas freed 70 slaves. Al-Hakim narrated it. ‘Uthman freed twenty when he was besieged, and Hakim ibn Hizam freed a hundred loading them with silver, and ‘Abd Allah ibn ‘Umar freed a thousand, and he performed a thousand ‘umrahs, and he performed sixty Hajjs, and he kept 1000 horses for [fighting] in the path of Allah, and Dhu l-Kala‘ al-Himyari freed 8000 slaves in one day, and ‘Abd al-Rahman ibn ‘Awf freed 30,000 people. See: Fath al-‘Allam Sharh Bulugh al-Maram, Kitab al-‘Itq (2:332).

These are only eight men, who had freed 39322 slaves! You can deduce from this the extent of the generosity of the Muslims in freeing their slaves. And those whose condition this was with respect to freeing, how is it possible that their treatment of slaves would not be one of noble brotherly behaviour?

This is slavery in Islam and these are its consequences! We should cite here some testimonies from some of the westerners who observed the conditions of the slaves in Islam. A French writer said:

Slavery is not a blemish in the Islamic lands. All the sultans of Constantinople who were Muslim rulers were all born from the wombs of slave women, and that did not diminish their bravery and their courage…The rulers of Egypt would often purchase slaves, educate them and nurture them, and then marry them to their daughters. When you examine the rulers of Cairo and its leaders and the generals of its armies, you will find that most of them were from those who were sold [into slavery] in their young age for a price between 800 to 1,200 [coins].

And Lady Blunt, an English woman who travelled to the Arab lands, documents in the chronicles of her visit to Najd a conversation she had with an Arab man:

There was something that the man did not find comprehensible, which is why the English empire banned slave trade. We said to him: “That is the requirement of humanism.” He replied: “There is no oppression in trading slaves, and has anyone seen us mistreating our slaves?” And the reality was that this answer dumbfounded us, as we were not able to show the man a single example of mistreatment of slaves in what we saw for the entire period of our stay in Arabia. The truth is that the slave for the Arabs is not a servant of theirs, but a beloved child of theirs.

These statements and the likes of them were quoted by Gustave Le Bon in his book called The Civilisation of the Arabs, and then he said in conclusion:

Those Europeans who wish to ban slave trade in the Eastern lands, although they have goodwill towards mankind and have good intention, the Eastern people will not accept that, and will say: “What is it with these ‘well-wishers’ having affection for the Ethiopians, yet forcing the Chinese people with their machine guns and their bombs to sell opium, and have caused the death of men and have shed more blood in one year than slave owners have not done in tens of years?!”

See the Urdu translation of The Civilisation of the Arabs (p. 348).

Refutation of those who Claim that Slavery is Abrogated

In recent times, many of the Europeans objected to the rule of slavery in Islam, ignorant or feigning ignorance of its conditions and its limits, and its wisdoms and its powerful effects in history. Then a group stood from amongst the Muslims apologising on behalf of Islam, and distorting it based on the whims of the Westerners. Thus, they said that slavery is not permissible in Islam today, and it was only allowed in the beginning of Islam; then, this permission was abrogated in the latter parts of the life of the Prophet (Allah bless him and grant him peace). From those in India who defended this weak and false claim is the famous writer Chiragh Ali, who was a colleague of Sir Sayyid Ahmad Khan. He wrote an article in his book The Greatest Statement on the Ascension of Islam to prove this claim and he produced therein weak evidences which will make even the bereaved laugh. We have no need to cite these evidences and refute them as they are such that all who have the slightest grasp of religion and knowledge will regard them as baseless, but he produced a doubt in this book which may be confusing to some people, so we wish to discuss it and refute it.

He cited His (Exalted is He) statement in Surah Muahmmad: “When you have thoroughly subdued them, bind a bond firmly [on them]. Then, it is either (imma) generosity or ransom.” (47:4) And he said: “Allah (Exalted is He) mentioned only two options for the prisoners of war: generosity or ransom, and He did not mention execution or enslavement. Thus it is evident that they were commands at the start of Islam, but this verse abrogated it thereafter.”

Since this doubt has confused the matter for some people, we should respond to it in some detail.

Know that there is no evidence in this verse whatsoever for the prohibition of taking slaves and the abrogation of its permissibility, and that is for a number of reasons:

1) If we were to look at the words of the verse we see that they do not negate enslavement because the word “imma” (either/or) does not prove restriction at all, and this word is used in the meaning of excluding the possibility of combining the options (man‘ al-jam‘) [1]Meaning, negating the possibility of taking all of the options at once. Instead, one of the options must be taken at the expense of the other options. as in their statement, “Sit either with Hasan or Zayd,” which does not negate sitting with others. Ibn Hisham said:

Imma has five meanings. First, doubt, like: “Either Zayd or ‘Amr came to me,” when it is not known which of them came. Second, ambiguity, like: “And there are others whose matter is deferred till the command of Allah [comes]. Either He would punish them or relent towards them.” (9:106) Third, to give choice, like: “Either punish them or adopt good behaviour with them” (18:86) and: “Either you throw, or shall we be first to throw?” (20:65)… Fourth, permission, like: “Either you learn jurisprudence or grammar,” and: “Sit either with Hasan or with Ibn Sirin.” Fifth, elaboration, like: “Either grateful or ungrateful” (76:3). This is from Mughni al-Labib of Ibn Hisham (1:60)

It is thus evident that imma does not have the meaning of restriction. Yes, when this word is used in between two opposite entities, it comes for restriction, not because it is from the meanings of the word imma, but because of the opposition between the two entities rationally. And since rationally a third thing can be added to generosity and ransom in the verse, it is evident that the word imma is not for restriction in the verse, but is in the meaning of permission by way of negating the possibility of combining between the various options, not actual exclusion [of any one of the options].

Once you are aware of this, the verse only mentions two options with respect to the captives without negating anything else. It is silent about other options and does not negate them. So when enslavement or execution are established by other Shar‘i proofs, the verse does not conflict with them or deny them, and enslavement is established by other decisive evidences as will come later if Allah wills, so it cannot be rejected based on this verse.

As for the wisdom in Allah (Exalted is He) sufficing here with generosity and ransom, and not mentioning execution and enslavement, it is that execution and enslavement were widespread and known, and no one would doubt their permissibility when the Qur’an was revealed, but there was doubt only in the permissibility of granting favour and ransom, so Allah (Glorified is He) explained their ruling.

Imam al-Razi answered it in another way, as he said in his Tafsir (7:508): “Imma and innama are for restriction [2]It has passed that imma is not for restriction, so Imam al-Razi (Allah have mercy on him) erred here. (Mufti Taqi Usmani)  and their condition after captivity is not restricted to these two matters. Rather, execution, enslavement, generosity and ransom are all permissible. We say: This is a counsel, so He mentioned a general command applicable to all categories [of captives]. Enslavement is not permissible for the Arab captives, as the Prophet (Allah bless him and grant him peace) was from them, thus he did not mention enslavement. As for execution, [it is not mentioned] because the apparent [condition] of those who are thoroughly subdued is that they are crippled [and so cannot inflict any harm], and because killing was mentioned in His statement ‘smiting the necks’ (47:4). Hence, only the two options remain.”

2) When we consider the word generosity (mann), it may also include enslavement, as generosity is to release the captive without any monetary exchange and without killing [him] and that is also achieved by enslavement. This is why al-Zamakhshari said in al-Kashshaf (4:316): “It is possible that by ‘generosity’ is meant that he favours them by not killing them and they are put into slavery, or he favours them by releasing them after their acceptance of jizyah and [their acceptance of] being from the people of the covenant (dhimmah).” So if this explanation is taken and there is no obstacle to it at all [3]This interpretation can be derived from the opinion of al-Hasan al-Basri, because he disliked executing the captive and he recited “either generosity or ransom” and he derived from this [verse] … Continue reading, enslavement is [in fact] mentioned in this verse and is not negated or unmentioned.

3) Many verses were revealed after this verse which prove the permissibility of enslavement, and if the verse of generosity and ransom abrogated slavery, these verses would not have been revealed after it. The explanation of this is that Surah Muhammad is Meccan according to some Tabi‘in, like Sa‘id ibn Jubayr, al-Dahhak and according to al-Tha‘labi as al-Qurtubi related in his Tafsir (12:323); and it is Medinan according to the majority, but was revealed around the time of the Battle of Badr, either before the battle as indicated by the explanation of Ibn ‘Abbas in Tanwir al-Miqbas [4]Tanwir al-Miqbas, printed in a collection of four Tafsirs (5:592), and it is known that the chain of transmission of Tanwir al-Miqbas is not authentic to Ibn ‘Abbas, but I mentioned it as a … Continue reading, or after the Battle of Badr as mentioned in Tafsir Ibn Kathir (4:173). Hence, the time of its revelation did not go beyond 2 H. And after that the following verses were revealed:

He (Exalted is He) said in the verse of unmarriagable women (muharramat): “Also [prohibited are] women already married, except those whom your right hands possess,” (4:24) and this verse was revealed about the captives of Awtas, as has preceded in Bab Jawaz Wat’ al-Masbiyyah ba‘d al-Istibra from this book. Muslim transmitted the hadith from Abu Sa‘id al-Khudri that the Messenger of Allah (Allah bless him and grant him peace) on the Day of Hunayn sent an army to Awtas, whereupon they faced the enemy and fought them and overcame them and captured prisoners from them. People from the companions of the Messenger of Allah (Allah bless him and grant him peace) believed it was sinful to have intercourse with them due to their husbands from the idolaters, so Allah (Glorified and Exalted is He) revealed about that: “Also [prohibited are] women already married, except those whom your right hands possess” i.e. they are permissible for you, when their waiting period finishes.

Hence, Allah (Glorified is He), in this verse, allowed enslavement and taking captives as concubines, even though it was revealed after the verse of generosity and ransom, so if enslavement was abrogated by the verse of generosity and ransom, how could this permission have been revealed in the year 8 H?

He (Exalted is He) said in Surah al-Ahzab: “O prophet! We have made lawful to you your wives to whom you have paid their dowers; and those whom your right hand possesses out of the prisoners of war whom Allah has given to you as spoils of war.” (33:50) Hence, Allah (Glorified is He) allowed for His Messenger (Allah bless him and grant him peace) to take captives from the spoils of war as concubines, and it is known that no captive came as spoils of war in the Battle of Badr or Uhud or Ahzab but they came in the Battle of Khaybar and other later battles, so this ruling is definitely later than the verse of generosity and ransom.

And then He (Exalted is He) said after that: “No women are lawful for you after this, nor is it lawful that you replace them [i.e. the present wives] with other wives, even though their goodness may attract you.” (33:52) Ibn Kathir said in his Tafsir (3:501): “Many scholars, like Ibn ‘Abbas, Mujahid, al-Dahhak, Qatadah, Ibn Zayd, Ibn Jarir and others, mentioned that this verse was revealed as a reward for the wives of the Prophet (Allah bless him and grant him peace) and in approval of them for their beautiful conduct in their choosing Allah and His Messenger [over worldly pleasures]. Their reward is that Allah restricted him to them, and He forbade him from marrying others, or to replace them with other wives even if their goodness attracts him, except slave women and captives, as there is no harm for him in them. Then He (Exalted is He) removed the burden from him in this and He abrogated the ruling of this verse and He allowed him to marry [others], although he did not marry thereafter, as a favour of the Messenger of Allah (Allah bless him and grant him peace) over them.”

Thus the statement of Ibn Kathir proves that these verses were revealed after the choice given [to the wives of the Prophet (peace be upon him) mentioned in Qur’an 33:28-9], and the choice was given [to them] in the year 9 H, as al-Hafiz verified in al-Fath, Tafsir al-Ahzab (8:401), and in Bab Maw‘izat al-Rajul ibnatahu min al-Nikah (9:250), so this verse was certainly revealed in 9 H or afterwards, and there is permission of enslavement and taking slaves as concubines in it. From another perspective, the statement of Ibn Kathir clearly proves that he (Allah bless him and grant him peace) did not marry a woman after the revelation of this verse, and the last woman the Messenger of Allah (Allah bless him and grant him peace) married was Maymunah, who he married in 7 H during the make-up ‘umrah, as Ibn Sa‘d mentioned in his Tabaqat (8:132), so this verse was revealed after 7 H. In all cases, the verse was revealed long after the verse of generosity and ransom, and there is permission in it of enslavement and taking concubines.

4) It is established from the Prophet (Allah bless him and grant him peace) that he took slaves in more than one instance after the revelation of this verse, as he enslaved the women and children of Banu Qurayzah, which was shortly after Ahzab, and he enslaved the women of Khaybar – and from them Safiyyah, the Mother of the Believers (Allah be pleased with her) – and he enslaved Banu al-Mustaliq – and from them Juwayriyah, the Mother of the Believers – and he enslaved the women of Awtas, as has preceded, and the women of Hawazin and he distributed them amongst the fighters.

The last word spoken by the Messenger of Allah (Allah bless him and grant him peace) is: “[Be observant of] Salah, and [be good to] those your right hands possess,” as has preceded from the narration of Ibn Majah and Abu Dawud. The permissibility of slavery, and recognition of right-hand ownership, is evident in this. Hence, there is no ruling more decisive than this, and there is no possibility of abrogation therein at all, as it is the final word of the Noble Messenger (Allah bless him and grant him peace). Thereafter, slavery remained an institution practiced by the ummah in the time of the Sahabah and those after them, and no one condemned it. Were they all – and protection is from Allah – ignorant of the verse of generosity and ransom? Was there none amongst them who understood the Qur’an?! Would they not give attention to the laws of Allah (Glorified is He)?! Can anyone conceive of this from the Sahabah, Tabi‘in, jurists and hadith-masters who spent their lives and wealth in the path of conveying the pure religion, and did not fear in that the blame of a blamer?

Thus, the clear manifest truth is that taking slaves is permissible in Islam, with its laws and its limits which have preceded, and nothing has abrogated it, and there are wisdoms in this which we have explained, and the opinion of its abrogation is rejected and is against consensus, and has no proof from the proofs of the Shari‘ah.


Here something important should be kept in mind, which is that most of the nations of the world have today formed a pact between them, and have agreed that a prisoner from the captives of war will not be put into slavery, and most of the Islamic lands today are participants of this agreement, particularly the members of the United Nations, so it is not permissible for an Islamic country today to put a captive into slavery as long as this pact remains. As for the question of whether this pact is allowed, I have not seen its ruling explicitly in [the writings of] the early scholars, and it is apparent that it is permissible because taking slaves is not something obligatory, rather it is an option from four options, and the option therein is for the Imam. And it is apparent from the texts on the virtue of emancipation and other [texts] that freedom is more desirable in the Islamic Shari‘ah [than slavery], so there is no harm in making such a pact, so long as other nations conform to it and do not violate it. And Allah (Glorified and Exalted is He) knows best the truth, and to Him is the return and destination.

Takmilah Fath al Mulhim 1:260-269

1 Meaning, negating the possibility of taking all of the options at once. Instead, one of the options must be taken at the expense of the other options.
2 It has passed that imma is not for restriction, so Imam al-Razi (Allah have mercy on him) erred here. (Mufti Taqi Usmani) 
3 This interpretation can be derived from the opinion of al-Hasan al-Basri, because he disliked executing the captive and he recited “either generosity or ransom” and he derived from this [verse] that the Imam does not have the right to execute the prisoners that come under his authority, but he has three choices: either freedom, ransom or enslavement, as mentioned in Tafsir al-Qurtubi (16:228). This entails that he included enslavement in “generosity,” and this is what became apparent to me in carefully reading Tafsir Ibn Jarir (26:24-5), as his speech indicates that generosity includes enslavement, and Allah knows best. (Mufti Taqi Usmani)
4 Tanwir al-Miqbas, printed in a collection of four Tafsirs (5:592), and it is known that the chain of transmission of Tanwir al-Miqbas is not authentic to Ibn ‘Abbas, but I mentioned it as a possible interpretation. (Mufti Taqi Usmani)