I heard the Messenger of Allah ﷺ say, "The best of your leaders are those whom you love and who love you, those upon whom you invoke blessings and who invoke blessings upon you. The worst of your leaders are those whom you hate and who hate you, those whom you curse and who curse you."They said, "We asked, 'Messenger of Allah, should we not then confront them with the sword?'"He replied, "No, not as long as they establish the prayer among you. No, not as long as they establish the prayer among you. Whoever has a ruler placed over him and sees him committing some act of disobedience to Allah should hate the disobedience to Allah that he commits, but he must not withdraw his hand from obedience."
سمعت رسول الله ﷺ يقول: خيار أئمتكم الذين تحبونهم ويحبونكم، وتصلون عليهم ويصلون عليكم، وشرار أئمتكم الذين تبغضونهم ويبغضونكم، وتلعنونهم ويلعنونكم قالوا: قلنا: يا رسول الله أفلا ننابذهم عند ذلك؟ قال: لا ما أقاموا فيكم الصلاة، لا ما أقاموا فيكم الصلاة، ألا من ولي عليه، وال، فرآه يأتي شيئا من معصية الله فليكره ما يأتي من معصية الله، ولا ينزعن يدا من طاعة.
Muslim narrated it in al-Imarah (1855:66), from Dawud bin Rashid, who said, Walid, meaning Ibn Muslim, told us, Abdul-Rahman bin Yazid bin Jabir told us, the client of Banu Fazara, who was Ruzayq bin Hayan, informed me that he heard Muslim bin Qurza, the paternal cousin of Awf bin Malik Ashjai, say, I heard Awf bin Malik Ashjai say, and then he mentioned it.