The Prophet ﷺ, when he sent Muaz bin Jabal to Yemen, asked him how he would judge if a case were brought before him.Muaz replied, "I will judge according to the Book of Allah."The Prophet ﷺ asked, "And if it is not in the Book of Allah?"Muaz said, "Then by the Sunnah of the Messenger of Allah ﷺ."The Prophet ﷺ asked, "And if it is not in the Sunnah of the Messenger of Allah ﷺ?"Muaz said, "Then I will exercise my own judgment, sparing no effort."Muaz said, "He then struck my chest and said, 'Praise be to Allah, who has guided the messenger of the Messenger of Allah ﷺ to that which pleases His Messenger.'"
حدثنا عبد الله حدثني أبي حدثنا عفان حدثنا شعبة أخبرني أبو عون قال سمعت الحارث بن عمرو ابن أخي المغيرة بن شعبة يحدث عن ناس من أصحاب معاذ من أهل حمص
أن النبي ﷺ قال لمعاذ بن جبل حين بعثه إلى اليمن فذكر كيف تقضي إن عرض لك قضاء قال أقضي بكتاب الله قال فإن لم يكن في كتاب الله قال فسنة رسول الله ﷺ قال فإن لم يكن في سنة رسول الله ﷺ قال أجتهد رأيي ولا آلو قال فضرب صدري فقال الحمد لله الذي وفق رسول رسول الله ﷺ لما يرضي رسوله