Mishkat
al-Masabih
مشكاة المصابيح
The Offices of Commander and Qadi
كتاب الإمارة والقضاء
Chapter 2b: How to Conduct the Office of Qadi, and Fear of it - Section 2
باب العمل في القضاء والخوف منه - الفصل الثاني
Mishkat al-Masabih 3737
Mu'adh b. Jabal told that when Allah's Messenger ﷺ sent him to the Yemen he asked him how he would judge when the occasion arose, and he replied that he would judge in accordance with Allah’s Book. He asked what he would do if he could not find guidance in Allah’s Book, and he replied that he would act in accordance with Allah's Messenger ﷺ’s sunnah. He asked what he would do if he could find no guidance in Allah's Messenger ﷺ’s sunnah, and he replied that he would do his best to form an opinion and spare no pains. Allah's Messenger ﷺ then tapped him on the breast and said, “Praise be to Allah who has disposed His Messenger’s Messenger to something with which Allah's Messenger ﷺ is pleased!" Tirmidhi, Abu Dawud and Darimi transmitted it.
وَعَنْ مُعَاذِ بْنِ جَبَلٍ: أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ لَمَّا بَعَثَهُ إِلَى الْيَمين قَالَ: «كَيْفَ تَقْضِي إِذَا عَرَضَ لَكَ قَضَاءٌ؟» قَالَ: أَقْضِي بِكِتَابِ اللَّهِ قَالَ: «فَإِنْ لَمْ تَجِدْ فِي كِتَابِ اللَّهِ؟» قَالَ: فَبِسُنَّةِ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قَالَ: «فَإِنْ لَمْ تَجِدْ فِي سُنَّةِ رَسُولِ اللَّهِ؟» قَالَ: أَجْتَهِدُ رَأْيِي وَلَا آلُو قَالَ: فَضَرَبَ رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَلَى صَدْرِهِ وَقَالَ: «الْحَمْدُ لِلَّهِ الَّذِي وَفَّقَ رَسُولَ رَسُولِ اللَّهِ لِمَا يَرْضَى بِهِ رَسُولُ اللَّهِ» . رَوَاهُ التِّرْمِذِيّ وَأَبُو دَاوُد والدارمي
In-book reference: Mishkat al-Masabih Book 18 Chapter 2b Hadith 1