Sayyidah Aishah (may Allah be pleased with her) said that the Messenger of Allah (peace and blessings be upon him) said: "When Allah intends good for a ruler, He appoints for him a truthful minister who reminds him if he forgets and helps him if he remembers; and when He intends otherwise, He appoints for him an evil minister who does not remind him if he forgets and does not help him if he remembers."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20320