The Messenger of Allah ﷺ sent a military expedition on the day of Hunayn toward Awtas. They encountered their enemy, fought them, and prevailed over them, capturing female prisoners. Some of the companions of the Messenger of Allah ﷺ felt reluctant to have relations with these women because they had husbands among the polytheists. So Allah the Exalted revealed concerning this, "And married women, except those whom your right hands possess" [Nisa 4:24], meaning they are lawful for them once their waiting period has ended.
حدثنا عبيد الله بن عمر بن ميسرة حدثنا يزيد بن زريع حدثنا سعيد عن قتادة عن صالح أبي الخليل عن أبي علقمة الهاشمي
أن رسول الله ﷺ بعث يوم حنين بعثا إلى أوطاس فلقوا عدوهم فقاتلوهم فظهروا عليهم وأصابوا لهم سبايا فكأن أناسا من أصحاب رسول الله ﷺ تحرجوا من غشيانهن من أجل أزواجهن من المشركين فأنزل الله تعالى في ذلك {والمحصنات من النساء إلا ما ملكت أيمانكم} أي فهن لهم حلال إذا انقضت عدتهن