Why has the Quran permitted slavery and set rulings for it?
Having slaves was not established by Islam, but it was established thousands of years before Islam and spread throughout the world in an unjust manner, then Islam made it limited and brought it out of its unjust state by setting just rulings for it. In Islam, a slave is a person who is himself or his father an enemy of Allah and His Caliph on the earth and is taken as a captive in war with Muslims, but instead of being killed, he is handed over to one of the Muslims to work for him within the framework of the rulings of Islam as much as he can, and in return, he enjoys the right to housing, food, clothing, and marriage. This is similar to employing him as a full-time worker, which at the same time gives him the opportunity to learn about Islamic culture and teachings, embrace Islam voluntarily without any coercion, and attain true happiness in the Hereafter.
Nevertheless, Islam has greatly urged the freeing of slaves, as it has stated: ﴿فَلَا اقْتَحَمَ الْعَقَبَةَ وَمَا أَدْرَاكَ مَا الْعَقَبَةُ فَكُّ رَقَبَةٍ﴾[1]; “He did not take the difficult path; and how would you know what the difficult path is?! (It is) the freeing of a slave.” Yet it has not stopped there but rather made the freeing of slaves an expiation for many sins, such as killing, zihar, breaking an oath, and more, and it has not stopped there either but rather condemned the slave trade and considered it one of the worst businesses; as it has been narrated from the Messenger of Allah, peace and blessings of Allah be upon him and his family, that he said: «قَدْ أَتَانِي جَبْرَئِيلُ عَلَيْهِ السَّلَامُ فَقَالَ: يَا مُحَمَّدُ، إِنَّ شِرَارَ أُمَّتِكَ الَّذِينَ يَبِيعُونَ النَّاسَ»[2]; “Jabra’il, peace be upon him, came to me and said: ‘O Muhammad! The worst of your Ummah are those who sell people,’” and in another narration, he said: «شَرُّ النَّاسِ مَنْ بَاعَ النَّاسَ»[3]; “The worst of people are those who sell people,” and in another narration: «نَهَى حَكِيمَ بْنَ حِزَامٍ عَنِ التِّجَارَةِ فِي الرَّقِيقِ»[4]; “He forbade Hakim ibn Hizam from trading in slaves,” and in another narration, he said: «التِّجَارَةُ فِي الرَّقِيقِ مُمْحِقَةٌ»[5]; “Trading in slaves is destructive,” and in another narration, he said to people when they were speaking about a man who had passed away and loved him greatly: «رَحِمَهُ اللَّهُ، وَاللَّهِ لَقَدْ كَانَ يُحِبُّنِي حُبًّا لَوْ كَانَ نَخَّاسًا لَغَفَرَ اللَّهُ لَهُ»[6]; “May Allah have mercy on him. By Allah, his love for me was so great that even if he had been a slave trader, Allah would have forgiven him.” This is clear evidence of the hatred of this merciful religion for taking slaves and its strong inclination to free them, after its great urging to be kind and good to them during their slavery; as it is evident from what has been narrated from Ali, peace be upon him, who said: «كَانَ آخِرُ كَلَامِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: الصَّلَاةَ الصَّلَاةَ، اتَّقُوا اللَّهَ فِيمَا مَلَكَتْ أَيْمَانُكُمْ»[7]; “The last words of the Messenger of Allah, peace and blessings of Allah be upon him and his family, were: ‘Prayer, prayer. Fear Allah concerning those (slaves) in your possession,’” and from Umm Salama who said: «كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يَقُولُ فِي مَرَضِهِ: اللَّهَ اللَّهَ الصَّلَاةَ وَمَا مَلَكَتْ أَيْمَانُكُمْ، فَجَعَلَ يَتَكَلَّمُ بِهِ وَمَا يُفِيضُ»[8]; “The Messenger of Allah, peace and blessings of Allah be upon him and his family, said during his illness: ‘Allah, Allah. Prayer, and those (slaves) in your possession.’ He repeated this and did not stop,” and from Anas ibn Malik who said: «كَانَ آخِرُ وَصِيَّةِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ حِينَ حَضَرَهُ الْمَوْتُ: الصَّلَاةَ وَمَا مَلَكَتْ أَيْمَانُكُمْ، الصَّلَاةَ وَمَا مَلَكَتْ أَيْمَانُكُمْ، حَتَّى جَعَلَ يُغَرْغِرُ بِهَا صَدْرُهُ، وَمَا يَكَادُ يُفِيضُ بِهَا لِسَانُهُ»[9]; “The last will of the Messenger of Allah, peace and blessings of Allah be upon him and his family, when death was upon him, was: ‘Prayer, and those (slaves) in your possession. Prayer, and those (slaves) in your possession.’ (He repeated this) until his chest heaved with panting and his tongue could hardly pronounce it,” and from Ka‘b ibn Malik who said: «أُغْمِيَ عَلَى رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ سَاعَةً، ثُمَّ أَفَاقَ فَقَالَ: اللَّهَ اللَّهَ فِيمَا مَلَكَتْ أَيْمَانُكُمُ، أَلْبِسُوا ظُهُورَهُمْ، وَأَشْبِعُوا بُطُونَهُمْ، وَأَلِينُوا لَهُمُ الْقَوْلَ»[10]; “The Messenger of Allah, peace and blessings of Allah be upon him and his family, fainted for an hour, then he woke up and said: ‘Allah, Allah concerning those (slaves) in your possession. Provide them with clothes, fill their stomachs, and speak gently to them,’” and from Yazid ibn Jariyah[11] who said: «قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فِي حَجَّةِ الْوَدَاعِ: أَرِقَّاءَكُمْ أَرِقَّاءَكُمْ أَرِقَّاءَكُمْ أَرِقَّاءَكُمْ أَرِقَّاءَكُمْ، أَطْعِمُوهُمْ مِمَّا تَأْكُلُونَ، وَاكْسُوهُمْ مِمَّا تَلْبَسُونَ، فَإِنْ جَاؤُوا بِذَنْبٍ فَلَمْ تُرِيدُوا أَنْ تَغْفِرُوهُ فَبِيعُوا عِبَادَ اللَّهِ وَلَا تُعَذِّبُوهُمْ»[12]; “The Messenger of Allah, peace and blessings of Allah be upon him and his family, said in the Farewell Pilgrimage: ‘Your slaves, your slaves, your slaves, your slaves, your slaves! Feed them from what you eat, and clothe them from what you wear. If they commit a sin that you do not want to forgive, then sell the servants of Allah and do not torture them,’” and from Abu Dharr that the Messenger of Allah, peace and blessings of Allah be upon him and his family, said: «هُمْ إِخْوَانُكُمْ، جَعَلَهُمُ اللَّهُ تَحْتَ أَيْدِيكُمْ، فَمَنْ جَعَلَ اللَّهُ أَخَاهُ تَحْتَ يَدِهِ، فَلْيُطْعِمْهُ مِمَّا يَأْكُلُ، وَلْيُلْبِسْهُ مِمَّا يَلْبَسُ، وَلَا يُكَلِّفُهُ مِنَ الْعَمَلِ مَا يَغْلِبُهُ، فَإِنْ كَلَّفَهُ مَا يَغْلِبُهُ فَلْيُعِنْهُ عَلَيْهِ»[13]; “They are your brothers. Allah has put them under your control. So whoever Allah has made his brother under his control should feed him from what he eats, clothe him from what he wears, and not burden him with something that is too much for him. If he burdens him with something that is too much for him, then he should help him with it,’” and from Abu Hurairah who said: «قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: الْمَمْلُوكُ أَخُوكَ، فَإِذَا صَنَعَ لَكَ طَعَامًا، فَأَجْلِسْهُ مَعَكَ، فَإِنْ أَبَى فَأَطْعِمْهُ فِي يَدِهِ»[14]; “The Messenger of Allah, peace and blessings of Allah be upon him and his family, said: ‘An slave is your brother. So if he makes food for you, then sit him down with you. If he refuses, then feed him with your hand,’” and said: «قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: لِلْمَمْلُوكِ طَعَامُهُ وَكِسْوَتُهُ، وَلَا يُكَلَّفُ مِنَ الْعَمَلِ إِلَّا مَا يُطِيقُ»[15]; “The Messenger of Allah, peace and blessings of Allah be upon him and his family, said: ‘An slave has his food and his clothing, and he should not be burdened with work beyond what he can bear,’” and from Aisha who said: «قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: مَا زَالَ جِبْرِيلُ عَلَيْهِ السَّلَامُ يُوصِينِي بِالْمَمْلُوكِ حَتَّى ظَنَنْتُ أَنَّهُ يَضْرِبُ لَهُ أَجَلًا أَوْ وَقْتًا إِذَا بَلَغَهُ أُعْتِقَ»[16]; “The Messenger of Allah, peace and blessings of Allah be upon him and his family, said: ‘Jibril continued to advise me regarding slaves until I thought that he would set a deadline or a time for them that when they reach it, they would be freed,’” and from Abu Mas‘ud al-Ansari who said: «كُنْتُ أَضْرِبُ غُلَامًا لِي فَسَمِعْتُ صَوْتًا: اعْلَمْ أَبَا مَسْعُودٍ، اعْلَمْ أَبَا مَسْعُودٍ، اعْلَمْ أَبَا مَسْعُودٍ، اللَّهُ أَقْدَرُ عَلَيْكَ مِنْكَ عَلَيْهِ! فَالْتَفَتُّ فَإِذَا هُوَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ، فَقُلْتُ: يَا رَسُولَ اللَّهِ، هُوَ حُرٌّ لِوَجْهِ اللَّهِ تَعَالَى، قَالَ: أَمَا لَوْ لَمْ تَفْعَلْ لَلَفَحَتْكَ النَّارُ، أَوْ لَمَسَّتْكَ النَّارُ»[17]; “I was beating a slave of mine. Then I heard a voice saying: ‘Know, Abu Mas‘ud, know, Abu Mas‘ud, know, Abu Mas‘ud, Allah is more powerful over you than you are over him!’ So I turned around and saw that it was the Prophet, peace and blessings of Allah be upon him and his family. Then I said: ‘O Messenger of Allah! He is free for the sake of Allah Almighty.’ He said: ‘If you had not done this, the fire would have burned you,’ or ‘the fire would have touched you,’” and from Abdullah ibn Umar who said: «جَاءَ رَجُلٌ إِلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ فَقَالَ: يَا رَسُولَ اللَّهِ، إِنَّ لِي خَادِمًا يُسِيءُ وَيَظْلِمُ، أَفَأَضْرِبُهُ؟ قَالَ: تَعْفُو عَنْهُ كُلَّ يَوْمٍ سَبْعِينَ مَرَّةً»[18]; “A man came to the Prophet, peace and blessings of Allah be upon him and his family, and said: ‘O Messenger of Allah! I have a servant who misbehaves and does wrong. Should I beat him?’ He said: ‘Forgive him seventy times every day.’” Also, it has been narrated: «أَنَّ أَبَا أُسَيْدٍ جَاءَ إِلَى النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ بِسَبْيٍ مِنَ الْبَحْرَيْنِ، فَنَظَرَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ إِلَى امْرَأَةٍ مِنْهُنَّ تَبْكِي، قَالَ: مَا شَأْنُكِ؟ قَالَتْ: بَاعَ ابْنِي، قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ لِأَبِي أُسَيْدٍ: أَبِعْتَ ابْنَهَا؟ قَالَ: نَعَمْ، قَالَ: فِيمَنْ؟ قَالَ: فِي بَنِي عَبْسٍ، فَقَالَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ارْكَبْ أَنْتَ بِنَفْسِكَ فَأْتِ بِهِ»[19]; “Abu Usayd came to the Prophet, peace and blessings of Allah be upon him and his family, with captives from Bahrain. Then the Prophet, peace and blessings of Allah be upon him and his family, looked at a woman among them who was crying. He said: ‘What is the matter with you?’ She said: ‘My son was sold.’ The Messenger of Allah, peace and blessings of Allah be upon him and his family, said to Abu Usayd: ‘Did you sell her son?’ He said: ‘Yes.’ He said: ‘To whom?’ He said: ‘To the Banu Abs tribe.’ So the Prophet, peace and blessings of Allah be upon him and his family, said (to Abu Usayd): ‘Ride your horse and bring him back yourself,’” and it has been narrated: «أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ بَعَثَ زَيْدَ بْنَ حَارِثَةَ فِي سَرِيَّةٍ، فَأَصَابَ سَبْيًا، فَجَاءَ بِهِمْ فَاحْتَاجَ إِلَى ظَهْرٍ فَبَاعَ غُلَامًا مِنْهُمْ، فَجَاءَتْ أُمُّهُ فَرَآهَا النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ تَبْكِي، فَسَأَلَهُ، فَقَالَ: احْتَجْتُ إِلَى بَعْضِ الظَّهْرِ، فَبِعْتُ ابْنَهَا، فَقَالَ لَهُ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ: ارْجِعْ فَرُدَّهُ أَوِ اشْتَرِهِ، قَالَ: فَوَهَبَهُ بَعْدَ ذَلِكَ لِعَلِيٍّ، فَكَانَ خَازِنًا لَهُ»[20]; “The Prophet, peace and blessings of Allah be upon him and his family, sent Zayd ibn Harithah on a military expedition. He captured some captives and brought them back. Then he needed some provisions, so he sold a slave from among them. Then the slave’s mother came and the Prophet, peace and blessings of Allah be upon him and his family, saw her crying. He asked Zayd about it, and he said: ‘I needed some provisions, so I sold her son.’ So the Prophet, peace and blessings of Allah be upon him and his family, said: ‘Go back and return him or buy him.’ Zayd said: ‘He gave him to Ali after that, and he became his treasurer,’” and in another narration: «وَأَمَرَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ مُنَادِيهِ يُنَادِيَ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يَأْمُرُكُمْ أَنْ لَا تُفَرِّقُوا بَيْنَ ذَوِي الْأَرْحَامِ مِنَ الرَّقِيقِ»[21]; “The Messenger of Allah, peace and blessings of Allah be upon him and his family, ordered his herald to announce: ‘The Messenger of Allah, peace and blessings of Allah be upon him and his family, commands you to not separate the relatives from among the slaves.’”