A time came upon us when we were not in a position to give judgments, nor were we suited for that role. But Allah decreed that we have reached the position you now see. So whoever is presented with a case to judge from this day forward, let him judge by what is in the Book of Allah. If a matter comes that is not in the Book of Allah, let him judge by what His Prophet judged. If a matter comes that is neither in the Book of Allah nor judged upon by His Prophet ﷺ, let him judge by what the righteous have judged. And let none of you say, "I am afraid, I am afraid." For the lawful is clear and the unlawful is clear, and between them are doubtful matters. So leave what makes you doubt for what does not make you doubt.
أخبرني محمد بن علي بن ميمون قال حدثنا الفريابي قال حدثنا سفيان عن الأعمش عن عمارة بن عمير عن حريث بن ظهير
أتى علينا حين ولسنا نقضي ولسنا هنالك وإن الله عز وجل قدر أن بلغنا ما ترون فمن عرض له قضاء بعد اليوم فليقض فيه بما في كتاب الله فإن جاء أمر ليس في كتاب الله فليقض بما قضى به نبيه فإن جاء أمر ليس في كتاب الله ولم يقض به نبيه ﷺ فليقض بما قضى به الصالحون ولا يقول أحدكم إني أخاف وإني أخاف فإن الحلال بين والحرام بين وبين ذلك أمور مشتبهة فدع ما يريبك إلى ما لا يريبك
[Hasan] Darimi narrated it, 1/59, hadith 167, from Muhammad bin Yusuf Firyabi with this chain, and it is also in al-Kubra, hadith 5946. Sufyan here is Thawri. Shubah followed him in narrating it, as found in Darimi, 1/60, 61, hadith 171, and in Bayhaqi, except that he said, "I think that Abdullah said," and so on. Hurayth is of unknown reliability. Abdul-Rahman bin Yazid also followed him in narrating it, see the previous hadith.