Anas bin Malik said “The Apostle of Allaah(ﷺ) attacked Khaibar and we captured it by conquest. He then gathered the captives of war.”
Sunan Abi Dawud Book 20, Hadith 82