He wrote back to him, "Judge by what is in the Book of Allah. If it is not in the Book of Allah, then by the Sunnah of the Messenger of Allah ﷺ. If it is not in the Book of Allah nor in the Sunnah of the Messenger of Allah ﷺ, then judge by what the righteous have judged. If it is not in the Book of Allah, nor in the Sunnah of the Messenger of Allah ﷺ, and the righteous have not judged on it, then if you wish, go ahead, and if you wish, hold back, and I see nothing but good for you in holding back. Peace be upon you."
أخبرنا محمد بن بشار قال حدثنا أبو عامر قال حدثنا سفيان عن الشيباني عن الشعبي عن شريح أنه كتب إلى
فكتب إليه أن اقض بما في كتاب الله فإن لم يكن في كتاب الله فبسنة رسول الله ﷺ فإن لم يكن في كتاب الله ولا في سنة رسول الله ﷺ فاقض بما قضى به الصالحون فإن لم يكن في كتاب الله ولا في سنة رسول الله ﷺ ولم يقض به الصالحون فإن شئت فتقدم وإن شئت فتأخر ولا أرى التأخر إلا خيرا لك والسلام عليكم
No references are available.
[Sahih] Darimi reported it: 1/59,60, no. 169, and Bayhaqi: 10/115, from the hadith of Abu Ishaq Shaybani, with this chain, and it is also in Kubra, no. 5944. Sufyan is Thawri.