Ayesha reported,

Saad was wounded on the day of the Trench. A man from Quraysh called Ibn al-Ariqah shot him, striking him in the median arm vein. The Messenger of Allah ﷺ pitched a tent for him in the mosque so he could visit him from nearby.When the Messenger of Allah ﷺ returned from the Trench, he laid down his weapons and bathed. Then Jibreel came to him while he was shaking the dust from his hair and said, "You have laid down your weapons? By Allah, we have not laid them down. Go out against them."The Messenger of Allah ﷺ asked, "Where to?"Jibreel pointed toward Banu Qurayzah. So the Messenger of Allah ﷺ fought them, and they surrendered to the judgment of the Messenger of Allah ﷺ. The Messenger of Allah ﷺ referred the judgment concerning them back to Saad.Saad said, "I judge that their fighting men be killed, that their children and women be taken captive, and that their wealth be divided."

Muslim 4598

Sahih

و حدثنا أبو بكر بن أبي شيبة ومحمد بن العلاء الهمداني كلاهما عن ابن نمير قال ابن العلاء حدثنا ابن نمير حدثنا هشام عن أبيه

عن عائشة قالت

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

مسلم 4598صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Jihad and expeditions
Chapter
Permissibility of fighting those who broke the covenant and permissibility of allowing the people of a fortress to surrender to the judgment of a just ruler qualified to judge
Numbering
Darussalam 4598
Muslim 4598