Sahih Muslim , Hadith 1768

It has been narrated on the authority of Abu Sa'id al-Khudri who said: The people of Quraiza surrendered accepting the decision of Sa'd b. Mu'adh about them. Accordingly, the Messenger of Allah sent for Sa'd who came to him riding a donkey. When he approached the mosque, the Messenger of Allah said to the Ansar: Stand up to receive your chieftain. Then he said (to Sa'd): These people have surrendered accepting your decision. He (Sa'd) said: You will kill their fighters and capture their women and children. (Hearing this), the Propbot (may peace he tpon him) said: You have adjudged by the command of God. The narrator is reported to have said: Perhaps he said: You have adjuged by the decision of a king. Ibn Muthanna (in his version of the tradition) has not mentioned the alternative words.

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

sunnah.com

Through the same chain of transmitters Shu'ba has narrated the same tradition in which he says that the Messenger of Allah said (to Sa'd): You have adjudged according to the command of God. And once he said: you have adjudged by the decision of a king.

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

sunnah.com