Sahih al-Bukhari, Book 63, Hadith 30 (In-Book)

Narrated Abu Sa`id Al-Khudri: Some people (i.e. the Jews of Bani bin Quraiza) agreed to accept the verdict of Sa`d bin Mu`adh so the Prophet sent for him (i.e. Sa`d bin Mu`adh). He came riding a donkey, and when he approached the Mosque, the Prophet said, "Get up for the best amongst you." or said, "Get up for your chief." Then the Prophet said, "O Sa`d! These people have agreed to accept your verdict." Sa`d said, "I judge that their warriors should be killed and their children and women should be taken as captives." The Prophet said, "You have given a judgment similar to Allah's Judgment (or the King's judgment).

حَدَّثَنَا مُحَمَّدُ بْنُ عَرْعَرَةَ، حَدَّثَنَا شُعْبَةُ، عَنْ سَعْدِ بْنِ إِبْرَاهِيمَ، عَنْ أَبِي أُمَامَةَ بْنِ سَهْلِ بْنِ حُنَيْفٍ، عَنْ أَبِي سَعِيدٍ الْخُدْرِيِّ ـ رضى الله عنه ـ أَنَّ أُنَاسًا نَزَلُوا عَلَى حُكْمِ سَعْدِ بْنِ مُعَاذٍ، فَأَرْسَلَ إِلَيْهِ فَجَاءَ عَلَى حِمَارٍ، فَلَمَّا بَلَغَ قَرِيبًا مِنَ الْمَسْجِدِ قَالَ النَّبِيُّ صلى الله عليه وسلم ‏"‏ قُومُوا إِلَى خَيْرِكُمْ أَوْ سَيِّدِكُمْ ‏"‏‏.‏ فَقَالَ ‏"‏ يَا سَعْدُ، إِنَّ هَؤُلاَءِ نَزَلُوا عَلَى حُكْمِكَ ‏"‏‏.‏ قَالَ فَإِنِّي أَحْكُمُ فِيهِمْ أَنْ تُقْتَلَ مُقَاتِلَتُهُمْ وَتُسْبَى ذَرَارِيُّهُمْ‏.‏ قَالَ ‏"‏ حَكَمْتَ بِحُكْمِ اللَّهِ، أَوْ بِحُكْمِ الْمَلِكِ ‏"‏‏.‏

sunnah.com