'Auf bin Malik (May Allah be pleased with him) reported:
Messenger of Allah ﷺ said, "The best of your rulers are those whom you love and who love you, and those who supplicate Allah in your favour and you supplicate Allah in their favour. The worst of your rulers are those whom you hate and who hate you; and whom you curse and who curse you." It was asked (by those who were present): "Should not we oppose them?" He said, "No, as long as they establish Salat; as long as they establish Salat in your midst."
وعن عوف بن مالك رضي الله عنه قال: سمعت رسول الله ﷺ يقول: “خياركم أئمتكم الذين تحبونهم ويحبونكم، وتصلون عليهم ويصلون عليكم، وشرار أئمتكم الذين تبغضونهم ويبغضونكم، وتلعنونهم ويلعنونهم!” قال: قلنا يا رسول الله، أفلا ننابذه؟ قال: لا، ما أقاموا فيكم الصلاة، لا ما أقاموا فيكم الصلاة” ((رواه مسلم)).