Sahih al-Bukhari, Hadith 6262

Narrated Abu Sa`id: The people of (the tribe of) Quraiza agreed upon to accept the verdict of Sa`d. The Prophet sent for him (Sa`d) and he came. The Prophet said (to those people), "Get up for your chief or the best among you!" Sa`d sat beside the Prophet and the Prophet said (to him), "These people have agreed to accept your verdict." Sa`d said, "So I give my judgment that their warriors should be killed and their women and children should be taken as captives." The Prophet said, "You have judged according to the King's (Allah's) judgment." (See Hadith No. 447, Vol. 5)

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

sunnah.com