Abu Saeed Khudri reported,

The people of Qurayza agreed to surrender on the judgment of Saad bin Muaz, so the Prophet ﷺ sent for Saad, who came riding a donkey. When he drew near the mosque, the Prophet ﷺ said to the Ansar, "Stand up for your chief," or "for the best among you."Then he said, "These people have surrendered on your judgment."Saad said, "Their fighting men shall be killed and their women and children taken captive."The Prophet ﷺ said, "You have judged according to the ruling of Allah," and sometimes he said, "according to the ruling of the King."

Bukhari 4121

Sahih

حدثني محمد بن بشار حدثنا غندر حدثنا شعبة عن سعد قال سمعت أبا أمامة قال سمعت

أبا سعيد الخدري رضي الله عنه يقول

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

البخاري 4121صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Prophet ﷺ returning from Ahzab and going out to Banu Qurayzah and besieging them
Numbering
Darussalam 4121
Bukhari 4121