Sahih Muslim Book 8, Hadith Number 3432.
Chapter: It is permissible to have sexual intercourse with a captive woman after she is purified (of menses or delivery) in case she has a husband; her marriage is abrogated after she becomes captive.
Abu Sa’id al-Khudri (Allah her pleased with him) reported that at the Battle of Hanain Allah’s Messenger (May peace be upon him) sent an army to Autas and encountered the enemy and fought with them. Having overcome them and taken them captives, the Companions of Allah’s Messenger (May peace be upon him) seemed to refrain from having intercourse with captive women because of their husbands being polytheists. Then Allah, Most High, sent down regarding that: “And women already married, except those whom your right hands possess (iv. 24)” (i.e. they were lawful for them when their ‘Idda period came to an end).