Sayyiduna Abu Ayyub (may Allah be pleased with him) narrated from the Prophet (peace and blessings be upon him) that he (peace and blessings be upon him) said: "Whenever Allah appoints someone as a prophet or caliph, he has two ministers: one commands good and forbids evil, and the other spares no effort to corrupt him. Whoever is protected from the evil adviser has been protected."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20318