كتاب الإيمان
1
The Book of Faith
(71)
Chapter: The descent of 'Eisa bin Mariam to judge according to the Shari'ah of our Prophet Muhammad (saws); And how Allah has honored this Ummah; And clarifying the evidence that this religion will not be abrogated; and that a group from it will continue to adhere to the truth and prevail until the day of resurrection
(71)
باب نُزُولِ عِيسَى ابْنِ مَرْيَمَ حَاكِمًا بِشَرِيعَةِ نَبِيِّنَا مُحَمَّدٍ صلى الله عليه وسلم

It is narrated on the authority of Abu Huraira that the Messenger of Allah (ﷺ) observed:

What would you do when the son of Mary would descend amongst you and would lead you as one amongst you? Ibn Abi Dhi'b on the authority of Abu Huraira narrated: Your leader amongst you. Ibn Abi Dhi'b said: Do you know what the words:" He would lead as one amongst you" mean? I said: Explain these to me. He said: He would lead you according to the Book of your: Lord (hallowed be He and most exalted) and the Sunnah of your Apostle (ﷺ).
وَحَدَّثَنَا زُهَيْرُ بْنُ حَرْبٍ، حَدَّثَنِي الْوَلِيدُ بْنُ مُسْلِمٍ، حَدَّثَنَا ابْنُ أَبِي ذِئْبٍ، عَنِ ابْنِ شِهَابٍ، عَنْ نَافِعٍ، مَوْلَى أَبِي قَتَادَةَ عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏"‏ كَيْفَ أَنْتُمْ إِذَا نَزَلَ فِيكُمُ ابْنُ مَرْيَمَ فَأَمَّكُمْ مِنْكُمْ ‏"‏ ‏.‏ فَقُلْتُ لاِبْنِ أَبِي ذِئْبٍ إِنَّ الأَوْزَاعِيَّ حَدَّثَنَا عَنِ الزُّهْرِيِّ عَنْ نَافِعٍ عَنْ أَبِي هُرَيْرَةَ ‏"‏ وَإِمَامُكُمْ مِنْكُمْ ‏"‏ ‏.‏ قَالَ ابْنُ أَبِي ذِئْبٍ تَدْرِي مَا أَمَّكُمْ مِنْكُمْ قُلْتُ تُخْبِرُنِي ‏.‏ قَالَ فَأَمَّكُمْ بِكِتَابِ رَبِّكُمْ تَبَارَكَ وَتَعَالَى وَسُنَّةِ نَبِيِّكُمْ صلى الله عليه وسلم ‏.‏
Reference : Sahih Muslim 155 f
In-book reference : Book 1, Hadith 301
USC-MSA web (English) reference : Book 1, Hadith 292
  (deprecated numbering scheme)