Answer
Salam Brother,
Thank you for your question and for contacting Ask About Islam.
First of all we need to understand that Islam did not begin in a vacuum.
In fact it is the continuation and culmination of the Religion of God preached by the earlier prophets. The most important among these prophets were Noah, Abraham, David, Moses, and Jesus.
The stories of these prophets and their teachings are given in the Bible. It is noteworthy that Islam (surrender to the will of God) had been the religion preached by all the prophets of old, and Muhammad (PBUH) was only the last of these prophets whose mission was to complete the Religion of God preached by the previous prophets.
In the Quran (we read) Allah instructs the Prophet:
{Say: “I am no bringer of new-fangled doctrine among the apostles […]”} (Quran 46:9)
And again,
{Nothing is said to you that was not said to the apostles before you} (Quran 41:43)
The foregoing means that the Quranic instructions regarding slavery, which was a continuing socio-economic phenomenon at the time of the Prophet, must be viewed in the light of previous religious traditions.
In the prevailing circumstances of the time, slavery could not have been abolished at one stroke with a prohibiting declaration. What we see is that Allah has given in the Quran rulings that are aimed at the gradual abolition of slavery.
Indeed the Quran gives a number of directions and provisions encouraging the emancipation of slaves, which have proven quite effective for the purpose.
But what is more important and revolutionary is the teaching that the very idea of enslaving a human by another human is antithetical to the very fundamental principle of Islam itself: namely humans can be the slaves of only Allah Almighty.
No human can be subjugated by another human however powerful he might imagine himself to be. Surrender should be to Allah alone. Besides, all humans regardless of color, nationality, race, language, or social position are equal before God.
The only criterion for superiority before God is taqwa or devotion to God:
{O men! Behold, We have created you all out of a male and a female, and have made you into nations and tribes, so that you might come to know one another. Verily, the noblest of you in the sight of God is the one who is most deeply conscious of Him. Behold, God is all-knowing, all-aware.} (Quran 49:13)
This verse upholds the equality of human dignity derived from the equality of biological origin. And the Prophet too emphasized the same idea by saying:
All men are sons of Adam, and Adam came from dust. (Abu Dawud, Tirmidhi).
The above principles of Islam make it clear how the practice of slavery cuts at the very roots of Islam; and for that reason, Muslims should not fail to realize the purport of the Quranic teachings directing them to create a just society of equal human beings who are subservient to none but Allah Almighty.
An analogical situation for prohibition we can find in the matter of the prohibition of alcohol. Here the Quran adopts a process of gradual abolition until the final prohibition is declared.
By that time the Muslim society was prepared to forego the pleasure of intoxicating drinks to obey Allah’s commandments. But in the case of slavery this was not practicable.
And we may note that after the Prophet’s time, the new Muslim government in Madinah was not having a quiet time of socio-political development. There were conflicts and battles which led to the capture of prisoners of war who had to be provided for.
Unlike in modern times there were no prisons and the only option was to keep the prisoners in the custody of individual Muslims, which was in fact slavery. The Quran gives a number of provisions for the release of these prisoners.
To cite just two instances, Islam has made the freeing of slaves a means of expiation for the breaking of the fast in Ramadan as well as for the breaking of an oath.
Rich Muslims of the early period bought slaves and set them free as a deed of virtue deserving Allah’s special mercy. And as for the existing slaves the Prophet asked the slave-owners to treat them with kindness.
The Prophet insisted that their human dignity should be respected and they should be treated as brothers and sisters.
During the Prophet’s time a complete prohibition of slavery could not be practically effected as noted above, and that is why we do not find a categorical prohibition of slavery in the Quran.
And as the socio-political situation of the Prophetic times continued for some time after, neither the imams nor the jurists of the first generation could do anything about it.
In modern times slavery has ended worldwide since the international treaty for the abolition of slavery was signed in Berlin in 1860. Today, the law doesn’t permit anyone to enslave another.
Coming to the question of the treatment of slave women: You cannot find any Quranic justification for raping a woman; not even a slave woman. None at all.
There is no reason to assume that the allowance given to slave owners to have physical (consensual) relationship with their slave women is permission for rape. Rape is physical aggression and forceful humiliation inflicted on another person; it is a violation of a person’s dignity and honor:
A Muslim is the one from whose tongue and hand the Muslims are safe. (Bukhari)
Hence rape is an abomination; and it can never be allowed on any account.
It is noteworthy in this context that if a slave woman bears her master’s child, she should be set free. Even here we see a chance for a slave woman to become a free woman.
Based on the foregoing, we can say that slavery goes counter to the fundamentals of the Quran and the Sunnah, and hence it can be declared unacceptable.
I hope this helps. Please keep in touch. Salam.
Please continue feeding your curiosity, and find more info in the following links:
https://aboutislam.net/counseling/ask-about-islam/islam-encourage-rape-slavery/
https://aboutislam.net/counseling/ask-about-islam/is-abducting-and-selling-women-allowed-in-islam/
https://aboutislam.net/counseling/ask-about-islam/sex-with-slaves-whats-the-deal/