Mishkat al-Masabih
Mishkat al-Masabih 3741
Arabic hadith text
وَعَنْ عَبْدُ اللَّهِ بْنِ أَبِي أَوْفَى قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «إِنَّ اللَّهَ مَعَ الْقَاضِي مَا لَمْ يَجُرْ فَإِذَا جَارَ تَخَلَّى عَنْهُ وَلَزِمَهُ الشَّيْطَانُ» . رَوَاهُ التِّرْمِذِيُّ وَابْنُ مَاجَهْ وَفِي رِوَايَةٍ: «فَإِذَا جارَ وَكله إِلَى نَفسه»
Translation
Abdullah ibn Abi Awfa reported that the Messenger of God said: God is with the judge as long as he does not act unjustly. When he acts unjustly, God withdraws from him and Satan clings to him. Al-Tirmidhi and Ibn Majah transmitted it. In another version: When he acts unjustly, He leaves him to himself.
Translation notes
The final variant says the unjust judge is left to himself; both phrasings are retained.