Sunan an-Nasa'i, Volume 4, Book 26, Hadith 3335 (DarusSalam)

It was narrated from Abu Sa'eed Al-Khudri that the Prophet of Allah sent an army to Awtas. They met the enemy, fought them, and prevailed over them. They acquired female prisoners who had husbands among the idolaters. The Muslims felt reluctant to be intimate with them. Then Allah, the Mighty and Sublime revealed: "Also (forbidden are) women already married, except those (slaves) whom your right hands possess," meaning, this is permissible for you once they have completed their 'Iddah.

أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ الأَعْلَى، قَالَ حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ، قَالَ حَدَّثَنَا سَعِيدٌ، عَنْ قَتَادَةَ، عَنْ أَبِي الْخَلِيلِ، عَنْ أَبِي عَلْقَمَةَ الْهَاشِمِيِّ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ، أَنَّ نَبِيَّ اللَّهِ صلى الله عليه وسلم بَعَثَ جَيْشًا إِلَى أَوْطَاسٍ فَلَقُوا عَدُوًّا فَقَاتَلُوهُمْ وَظَهَرُوا عَلَيْهِمْ فَأَصَابُوا لَهُمْ سَبَايَا لَهُنَّ أَزْوَاجٌ فِي الْمُشْرِكِينَ فَكَانَ الْمُسْلِمُونَ تَحَرَّجُوا مِنْ غِشْيَانِهِنَّ فَأَنْزَلَ اللَّهُ عَزَّ وَجَلَّ ‏{‏ وَالْمُحْصَنَاتُ مِنَ النِّسَاءِ إِلاَّ مَا مَلَكَتْ أَيْمَانُكُمْ ‏}‏ أَىْ هَذَا لَكُمْ حَلاَلٌ إِذَا انْقَضَتْ عِدَّتُهُنَّ ‏.‏

sunnah.com