It is narrated from Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) that on the day of Hunayn the Messenger of Allah (peace and blessings be upon him) sent an army towards Awtas. They fought the enemy, overcame them and obtained female captives. The Companions (may Allah be pleased with them) felt reluctant to have intercourse with them because their polytheist husbands were still living, so Allah Almighty revealed this verse: "And (also forbidden are) married women, except those whom your right hands possess" [Surah al-Nisa: 24], "meaning that these are lawful for them once their waiting period ('iddah) has ended."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب النكاح / 13954