Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: "When someone is made a ruler, he has two circles among those close to him: a circle that commands him to obey Allah, and a circle that commands him to disobey, and he is counted with whichever of the two he obeys."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 8896