Abu Saeed Khudri reported,

Some people surrendered to accept the judgment of Saad bin Muaz, so the Prophet ﷺ sent for him. He came riding a donkey, and when he drew near the mosque, the Prophet ﷺ said, "Stand up for the best among you," or, "for your leader."Then he said, "Saad, these people have surrendered to accept your judgment."Saad replied, "I judge that their fighting men be killed and their women and children taken captive."The Prophet ﷺ said, "You have judged with the judgment of Allah," or, "with the judgment of the King."

Bukhari 3804

Sahih

حدثنا محمد بن عرعرة حدثنا شعبة عن سعد بن إبراهيم عن أبي أمامة بن سهل بن حنيف

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

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

البخاري 3804صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Virtues of the Ansar
Chapter
Virtues of Saad bin Muaz, may Allah be pleased with him
Numbering
Darussalam 3804
Bukhari 3804