Buraydah reported: The Prophet, peace and blessings be upon him, said, “The judges are three kinds: two judges are in Hellfire and one judge is in Paradise. A man who judges without the truth while he knows it, he is in Hellfire. A judge who has no knowledge and violates the rights of people, he is in Hellfire. A judge who judges with the truth, he is in Paradise.”
Source: Sunan al-Tirmidhī 1322
Grade: Sahih (authentic) according to Al-‘Iraqi
عَنْ بُرَيْدَة أَنَّ النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ الْقُضَاةُ ثَلَاثَةٌ قَاضِيَانِ فِي النَّارِ وَقَاضٍ فِي الْجَنَّةِ رَجُلٌ قَضَى بِغَيْرِ الْحَقِّ فَعَلِمَ ذَاكَ فَذَاكَ فِي النَّارِ وَقَاضٍ لَا يَعْلَمُ فَأَهْلَكَ حُقُوقَ النَّاسِ فَهُوَ فِي النَّارِ وَقَاضٍ قَضَى بِالْحَقِّ فَذَلِكَ فِي الْجَنَّةِ
1322 سنن الترمذي كتاب الأحكام باب ما جاء في القاضي
1/78 المحدث العراقي خلاصة حكم المحدث صحيح في تخريج الإحياء للعراقي