The Messenger of Allah ﷺ launched a military campaign against Khaybar, and we conquered it by force. The captives were then gathered together.
حدثنا داود بن معاذ حدثنا عبد الوارث ح و حدثنا يعقوب بن إبراهيم وزياد بن أيوب أن إسمعيل بن إبراهيم حدثهم عن عبد العزيز بن صهيب
أن رسول الله ﷺ غزا خيبر فأصبناها عنوة فجمع السبي
Bukhari narrated it in the Book of Prayer, chapter on what is mentioned regarding the thigh, no. 371, and Muslim in the Book of Marriage, chapter on the merit of freeing one's slave-woman and then marrying her, no. 1365, after no. 1427, from the hadith of Ismail bin Ibrahim...