Sahih Muslim
The Book of Jihad and Expeditions — Hadith #4465
Scholarly Consensus: Sahih How we grade
وَحَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ مَهْدِيٍّ، عَنْ شُعْبَةَ، بِهَذَا الإِسْنَادِ وَقَالَ فِي حَدِيثِهِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لَقَدْ حَكَمْتَ فِيهِمْ بِحُكْمِ اللَّهِ " . وَقَالَ مَرَّةً " لَقَدْ حَكَمْتَ بِحُكْمِ الْمَلِكِ " .
You have adjudged according to the command of God. And once he said: you have adjudged by the decision of a king.
Hadith Grading
Each grade below reflects one scholar's assessment of the chain of transmission. The grade describes the chain, not the Prophet's words. How we grade
Scholarly Consensus: Sahih