I heard the Messenger of Allah ﷺ say, "The best of your leaders are those whom you love and who love you, 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, whom you curse and who curse you."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. If anyone is governed by a ruler and sees him committing some act of disobedience to Allah, let him hate what he does of disobedience to Allah, but let him not withdraw his hand from obedience."
حدثنا علي بن إسحاق قال أنبأنا عبد الله قال أخبرني عبد الرحمن بن يزيد بن جابر قال حدثني زريق مولى بني فزارة عن مسلم بن قرظة وكان ابن عم عوف بن مالك قال سمعت
سمعت رسول الله ﷺ يقول خيار أئمتكم من تحبونهم ويحبونكم وتصلون عليهم ويصلون عليكم وشرار أئمتكم الذين تبغضونهم ويبغضونكم وتلعنونهم ويلعنونكم قلنا يا رسول الله أفلا ننابذهم عند ذلك قال لا ما أقاموا لكم الصلاة ألا ومن ولي عليه أمير وال فرآه يأتي شيئا من معصية الله فلينكر ما يأتي من معصية الله ولا ينزعن يدا من طاعة
Its isnad is sahih. Abdullah is Ibn Mubarak, and Abdul-Rahman bin Yazid bin Jabir is Abu Utbah al-Himsi, who is trustworthy, and his hadith is found in the collections of the group. As for Ruzayq, the correct form gives precedence to the ra, and he is Ibn Hayan al-Dimashqi, who is trustworthy, and his hadith is found in Muslim. Muslim bin Qarazah is among the senior successors, and his hadith is also found in Muslim, 3/1481, number 1855, in the book of leadership, and in Darimi, 2/417, number 2797, and in Bayhaqi, 8/158.