It is against Islam to rape Muslim women, but Muhammad actually encourages the rape of the other captured in the battle. The Hadith provides the context for the verse of the Koran 4:24.
The Apostle of Allah sent a military expedition to the Awtas on the occasion of the battle of Hunain. They met their enemy and fought against him. They conquered them and captured them. Some of the Companions of the Messenger of Allah hesitated to have sex with the prisoners in the presence of their disbelieving men. And Allah, the Exalted One, has sent the Koran a new verse of the Koran:
Also (forbidden are) women already married, except those (captives and slaves) whom your right hands possess. Thus has Allah ordained for you. All others are lawful, provided you seek (them in marriage) with Mahr (bridal money given by the husband to his wife at the time of marriage) from your property, desiring chastity, not committing illegal sexual intercourse, so with those of whom you have enjoyed sexual relations, give them their Mahr as prescribed; but if after a Mahr is prescribed, you agree mutually (to give more), there is no sin on you. Surely, Allah is Ever All-Knowing, All-Wise. (4:24)
"And women already married except those whom you right hands posses" (Abu Dawud 2150 and Muslim 3433)
In fact, as the Hadith remarked, it was not Allah, but "Allah the Exalted", who urged men to rape women before their husbands - which is all the more reason to think of Islam differently from other religions.
Note also that the husbands of these unhappy victims were still alive after the fight. This is important because it is the proponents of Islam who like to claim that the women who had enslaved Muhammad, were not able to defend themselves. Even if these proponents of Islam were right, what kind of moral code is it that forces a widow to choose between rape and starvation?
There are several other episodes in which Muhammad is offered the clear possibility to reject the rape of women - and yet he offers advice on how to proceed. In one case, his men hesitated to degrade their new slaves for later reuse by fattening them. Muhammad was asked above all for Coitus Interruptus:
that while he was sitting with Allah's Apostle he said, "O Allah's Apostle! We get female captives as our share of booty, and we are interested in their prices, what is your opinion about coitus interruptus?"
The Prophet said, "Do you really do that? It is better for you not to do it. No soul that which Allah has destined to exist, but will surely come into existence." (Bukhari 34:432)
As indicated, the Prophet of Islam has no objection to the fact that his husbands rape women as long as they ejaculate in the bodies of their victims.
As you can imagine, the obvious approval of Muhammad for the rape of women captured in the battle and his personal involvement, as held in many places, is very unpleasant for the Muslim advocates of our time. For this reason, some of them try to disclose these many episodes and Koran references to sex with prisoners by pretending that they are cases where women had fled from bad marriages and sought shelter with the Muslims. Some of the supporters of Islam even refer to them as "women," although the Koran makes a clear distinction between "those who have their rights" and true women (33:50):
O Prophet (Muhammad)! Verily, We have made lawful to you your wives, to whom you have paid their Mahr (bridal money given by the husband to his wife at the time of marriage), and those (captives or slaves) whom your right hand possesses - whom Allah has given to you, and the daughters of your 'Amm (paternal uncles) and the daughters of your 'Ammah (paternal aunts) and the daughters of your Khal (maternal uncles) and the daughters of your Khalah (maternal aunts) who migrated (from Makkah) with you, and a believing woman if she offers herself to the Prophet, and the Prophet wishes to marry her; a privilege for you only, not for the (rest of) the believers. Indeed We know what We have enjoined upon them about their wives and those (captives or slaves) whom their right hands possess, - in order that there should be no difficulty on you. And Allah is Ever Oft-Forgiving, Most Merciful.
Beyond the despair of the proponents of Islam of the 21st century, however, there is nothing in the historical text that supports this rosy revision of Muslim history. The women of Banu Mustaliq were sold to slavery after their rape:
Abu Sirma said to Abu Sa'id al Khadri (Allah he pleased with him): 0 Abu Sa'id, did you hear Allah's Messenger (Peace be upon him) mentioning al-'azl?
He said: Yes, and added: We went out with Allah's Messenger (Peace be upon him) on the expedition to the Bi'l-Mustaliq and took captive some excellent Arab women; and we desired them, for we were suffering from the absence of our wives, (but at the same time) we also desired ransom for them. So we decided to have sexual intercourse with them but by observing 'azl (Withdrawing the male sexual organ before emission of semen to avoid-conception). But we said: We are doing an act whereas Allah's Messenger is amongst us;
why not ask him? So we asked Allah's Messenger (Peace be upon him), and he said: It does not matter if you do not do it, for every soul that is to be born up to the Day of Resurrection will be born. (Sahih Muslim 3371)
In fact, female slaves were traded like any other simple commodity of Muhammad and his gang of devoted followers:
"Then the apostle sent Sa-d b. Zayd al-Ansari, brother of Abdu'l-Ashal with some of the captive women of Banu Qurayza to Najd and he sold them for horses and weapons." (Ibn Ishaq/Hisham/Hisham 693)
Is it Islamic to sell one's wife for horses? Clearly these were not wives!
More importantly, by definition a "captured" woman is not one who fled from her husband. She escapes from the Muslim slavery. This Hadith describes a typical attack in which the women and children are captured as they try to flee from the attacking Muslims:
"... and then we attacked from all sides and reached their watering-place where a battle was fought. Some of the enemies were killed and some were taken prisoners. I saw a group of persons that consisted of women and children. I was afraid lest they should reach the mountain before me, so I shot an arrow between them and the mountain. When they saw the arrow, they stopped. So I brought them, driving them along." (Sahih Muslim 4345)
The Muslim narrator sees the women who are trying to escape (after the massacre of their husbands) and cut their way by shooting an arrow into their way. These are not women who try to seek refuge with the Muslims. They try to avoid the capture by the Muslims.
The same Hadith tells further that Muhammad personally demanded one of the captured women for his own use:
I drove them along until I brought them to Abu Bakr who bestowed that girl upon me as a prize. So we arrived in Medina. I had not yet disrobed her when the Messenger of Allah (may peace be upon him) met me in the street and said: Give me that girl, O Salama. I said: Messenger of Allah, she has fascinated me. I had not yet disrobed her. When on the next day, the Messenger of Allah (may peace be upon him) again met me in the street, he said: O Salama, give me that girl ..." (Sahih Muslim 4345)
The Prophet of Islam and his companions used the war to gather women for personal sexual use and commerce. Unless she was arbitrarily declared as someone's wife, the woman became sex slave. In no case was their fate tied to anything they had done personally, nor had they any choice about their future.