Jami` at-Tirmidhi, Book 27, Hadith 32 (Tirmidhi 1994)

Abu Hurairah narrated that:

the Messenger of Allah said: "The religion is An-Nasihah" three times. They said: "O Messenger of Allah! For Whom?" He said : "To Allah , His books, the A'immah of the Muslims, and their average people."