Anas bin Malik reported,

The captives were gathered at Khaybar. Dihya came and said, "Messenger of Allah, give me a slave girl from the captives."The Prophet said, "Go and take a slave girl."So he took Safiya bint Huyayy. Then a man came to the Prophet ﷺ and said, "Prophet of Allah, you gave Dihya," (Yaqub said in his version, "Safiya bint Huyayy, the chief lady of Qurayza and Nadir,") then both narrators agreed, "she is not fitting for anyone but you."The Prophet said, "Call him and bring her with him."When the Prophet ﷺ looked at her, he said to him, "Take another slave girl from the captives instead of her." Then the Prophet ﷺ freed her and married her.

Abu Dawud 2998

Sahih

حدثنا داود بن معاذ حدثنا عبد الوارث ح و حدثنا يعقوب بن إبراهيم المعنى قال حدثنا ابن علية عن عبد العزيز بن صهيب

عن أنس قال

جمع السبي يعني بخيبر فجاء دحية فقال يا رسول الله أعطني جارية من السبي قال اذهب فخذ جارية فأخذ صفية بنت حيي فجاء رجل إلى النبي ﷺ فقال يا نبي الله أعطيت دحية قال يعقوب صفية بنت حيي سيدة قريظة والنضير ثم اتفقا ما تصلح إلا لك قال ادعوه بها فلما نظر إليها النبي ﷺ قال له خذ جارية من السبي غيرها وإن النبي ﷺ أعتقها وتزوجها

أبو داود 2998صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Land tax, leadership, and spoils of war
Chapter
Share of the chosen spoils
Numbering
Darussalam 2998
Abu Dawud 2998