Sunan an-Nasa'i, Book 49, Hadith 20 (In-Book)

It was narrated that 'Abdullah bin Mas'ud said: "There was a time when we did not pass so many judgments, but now that time is over. Now Allah, the Mighty and Sublime, has decreed that we reach a time when, as you see, (we are asked to pass many judgments). Whoever among you is asked to pass a judgment after this day, let him pass judgment according to what is in the Book of Allah. If he is faced with a matter that is not mentioned in the Book of Allah, let him pass judgment according to the way His Prophet [SAW] passed judgment. If he is faced with a matter that is not mentioned in the Book of Allah, and concerning which His Prophet did not pass judgment, then let him pass judgment according to the way the righteous passed judgment. And let him not say 'I am afraid, I am afraid.' For that which is lawful is clear and that which is unlawful is clear, and between them are matters which are not as clear. Leave that which makes you doubt for that which does not make you doubt."

أَخْبَرَنِي مُحَمَّدُ بْنُ عَلِيِّ بْنِ مَيْمُونٍ، قَالَ حَدَّثَنَا الْفِرْيَابِيُّ، قَالَ حَدَّثَنَا سُفْيَانُ، عَنِ الأَعْمَشِ، عَنْ عُمَارَةَ بْنِ عُمَيْرٍ، عَنْ حُرَيْثِ بْنِ ظُهَيْرٍ، عَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ، قَالَ أَتَى عَلَيْنَا حِينٌ وَلَسْنَا نَقْضِي وَلَسْنَا هُنَالِكَ وَإِنَّ اللَّهَ عَزَّ وَجَلَّ قَدَّرَ أَنْ بَلَغْنَا مَا تَرَوْنَ فَمَنْ عَرَضَ لَهُ قَضَاءٌ بَعْدَ الْيَوْمِ فَلْيَقْضِ فِيهِ بِمَا فِي كِتَابِ اللَّهِ فَإِنْ جَاءَ أَمْرٌ لَيْسَ فِي كِتَابِ اللَّهِ فَلْيَقْضِ بِمَا قَضَى بِهِ نَبِيُّهُ فَإِنْ جَاءَ أَمْرٌ لَيْسَ فِي كِتَابِ اللَّهِ وَلَمْ يَقْضِ بِهِ نَبِيُّهُ صلى الله عليه وسلم فَلْيَقْضِ بِمَا قَضَى بِهِ الصَّالِحُونَ وَلاَ يَقُولُ أَحَدُكُمْ إِنِّي أَخَافُ وَإِنِّي أَخَافُ فَإِنَّ الْحَلاَلَ بَيِّنٌ وَالْحَرَامَ بَيِّنٌ وَبَيْنَ ذَلِكَ أُمُورٌ مُشْتَبِهَةٌ فَدَعْ مَا يَرِيبُكَ إِلَى مَا لاَ يَرِيبُكَ‏.‏

sunnah.com