Abu Saeed Khudri reported,

On the day of Hunayn, the Messenger of Allah ﷺ sent an army to Awtas. They met an enemy force and fought them, prevailing over them and capturing female prisoners. Some of the companions of the Messenger of Allah ﷺ felt uneasy about having relations with these women because of their husbands among the polytheists. So Allah عز وجل revealed concerning this, "And married women, except those your right hands possess" [Nisa 4:24], meaning they are lawful for you once their waiting period has ended.

Azami 6492

Sahih

عن أبي سعيد الخدري

أن رسول الله ﷺ يوم حنين بعث جيشا إلى أوطاس، فلقوا عدوا فقاتلوهم، فظهروا عليهم، وأصابوا لهم سبايا، فكأن ناسا من أصحاب رسول الله ﷺ تحرجوا من غشيانهن من أجل أزواجهن من المشركين، فأنزل الله عز وجل في ذلك {والمحصنت من النساء إلا ما ملكت أيمنكم} [النساء: ٢٤] أي فهن لكم حلال إذا انقضت عدتهن.

الأعظمي 6492صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Marriage
Chapter
Prohibited marriages in Islam
Section
Prohibition of having intercourse with a pregnant woman among the captives and Jariya
Numbering
Jami al-Kamil 6492 (2nd edition)
Azami 6492