Sunan Abu Dawud 2998: Tribute, Spoils, and Rulership (Kitab Al-Kharaj, Wal-Fai' Wal-Imarah)
Anas said “Captives were gathered at Khaibar. Dihyah came out and said “Apostle of Allaah (saw) give me a slave girl from the captives.” He said “Go and take a slave girl. He took Safiyyah daughter of Huyayy. A man then came to the Prophet (saw) and said “You gave Safiyyah daughter of Huyayy, chief lady of Quraizah and Al Nadir to Dihyah? This is according to the version of Ya’qub. Then the agreed version goes “she is worthy of you.” He said “call him along with her. When the Prophet (saw) looked at her, he said to him “take another slave girl from the captives. The Prophet (saw) then set her free and married her
English translation, translator not named, from an open hadith text collection
Book 20: Tribute, Spoils, and Rulership (Kitab Al-Kharaj, Wal-Fai' Wal-Imarah)