Slavery had been prevalent and accepted in all past religions and cultures. Islam is the first and the only religion to say that a free person cannot be taken as slave. Prophet Muhammad (as) said that he will the opponent of a person on day of judgement who sold a free man as slave (Bukhari).
The concept of Slavery as practiced in America before abolition has no parallel in Islam. In those days in America, any free person could just be captured and made a slave with no rights at all. What we have in Islam is the custody of prisoners of war.
The reality of war is very harsh. Even in today’s modern and civilized world, when an army runs over a village or a city, there is no one to protect the women and others inhabitants from their wrath. Islam devised rules to protect people in such situations.
Before we go into details of Islamic rules about dealing with Prisoner of War, let’s keep realities of that era in our mind.
– Wars were fought by able citizens not by armies. There were situations when most of the men from a group may be killed, leaving women, children and old behind. What should have been done with those left behind?
– It was not always possible to simply free the Prisoners of War as they would come back for revenge.
– There were no institutions comparable to modern era which could hold and incarcerate captives and provide for their food and shelter.
Given these conditions and Islam being the universal religion valid for all times and places, what is the Islamic way of dealing with prisoners of war? Islam doesn’t insist on any specific approach, rather leaves it open for the believers to make a call based on the situation of battle. They may accept ransom or take captives, both have precedents in Islamic history. What Islam does instead is to put limits on the believers as they engage with the prisoners of war.
When the question of slavery in Islam is raised, it is about this practice of taking captive in a battle and then distributing them among the fighters who were required to provide for them. This was the only possibility in absence of modern institutions and may be more humane one in some respects. Prophet said your slave is like your brother and you should feed them from what you eat and cloth them from what you wear. Messenger of Allah (as) said: “Whoever slaps his slave or beats him, his expiation is to free him.” In short, they should be properly provided for and never mistreated. This was not only talk but was practically implemented by Prophet Muhammad (as), as evident from the fact that some of the Caliphs during Umayyad and Abbasid era were from slave origins.
Islam made it one of the most rewarding deeds to free a slave. So, idea was to deal with the harsh realities of war and not to create a permanent slave class in society. That’s why all children born out of a slave were considered free in Islam.
Islamic Law in no way requires this institution of slavery. As slavery in all forms are abolished in the modern world, Islamic law is complete without it and doesn’t need it in anyway.