صحيح البخاري Sahih Bukhari كتاب الأحكام The Book of Al-Ahkam (Judgements)
بَابُ إِذَا قَضَى الْحَاكِمُ بِجَوْرٍ أَوْ خِلاَفِ أَهْلِ الْعِلْمِ فَهْوَ رَدٌّ:

(35) Chapter. If a judge passes an unjust judgement or a judgement which differs from that of the learned religious men, such a judgement is to be rejected.

1 hadith
Hadith 7189
حَدَّثَنَا مَحْمُودٌ ، حَدَّثَنَا عَبْدُ الرَّزَّاقِ ، أَخْبَرَنَا مَعْمَرٌ ، عَنِ الزُّهْرِيِّ ، عَنْ سَالِمٍ ، عَنِ ابْنِ عُمَرَ ، بَعَثَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ خَالِدًا . ح ، وحَدَّثَنِي أَبُو عَبْدِ اللَّهِ نُعَيْمُ بْنُ حَمَّادٍ ، حَدَّثَنَا عَبْدُ اللَّهِ ، أَخْبَرَنَا مَعْمَرٌ ، عَنِ الزُّهْرِيِّ ، عَنْ سَالِمٍ ، عَنْ أَبِيهِ ، قَالَ : " بَعَثَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ خَالِدَ بْنَ الْوَلِيدِ إِلَى بَنِي جَذِيمَةَ ، فَلَمْ يُحْسِنُوا أَنْ يَقُولُوا أَسْلَمْنَا ، فَقَالُوا : صَبَأْنَا صَبَأْنَا ، فَجَعَلَ خَالِدٌ يَقْتُلُ وَيَأْسِرُ ، وَدَفَعَ إِلَى كُلِّ رَجُلٍ مِنَّا أَسِيرَهُ ، فَأَمَرَ كُلَّ رَجُلٍ مِنَّا أَنْ يَقْتُلَ أَسِيرَهُ ، فَقُلْتُ : وَاللَّهِ لَا أَقْتُلُ أَسِيرِي وَلَا يَقْتُلُ رَجُلٌ مِنْ أَصْحَابِي أَسِيرَهُ ، فَذَكَرْنَا ذَلِكَ لِلنَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، فَقَالَ : اللَّهُمَّ إِنِّي أَبْرَأُ إِلَيْكَ مِمَّا صَنَعَ خَالِدُ بْنُ الْوَلِيدِ مَرَّتَيْنِ " .
Narrated Ibn `Umar: The Prophet sent (an army unit under the command of) Khalid bin Al-Walid to fight against the tribe of Bani Jadhima and those people could not express themselves by saying, "Aslamna," but they said, "Saba'na! Saba'na! " Khalid kept on killing some of them and taking some others as captives, and he gave a captive to everyone of us and ordered everyone of us to kill his captive. I said, "By Allah, I shall not kill my captive and none of my companions shall kill his captive!" Then we mentioned that to the Prophet and he said, "O Allah! I am free from what Khalid bin Al-Walid has done," and repeated it twice.
Hadith Reference Sahih Bukhari / The Book of Al-Ahkam (Judgements) / Hadith: 7189
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة