(17) باب خِيَارِ الأَئِمَّةِ وَشِرَارِهِمْ
It has been narrated on the authority of 'Auf b. Malik that the Messenger of Allah (ﷺ) said:
The best of your rulers are those whom you love and who love you, who invoke God's blessings upon you and you invoke His blessings upon them. And 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 present): Shouldn't we overthrow them with the help of the sword? He said: No, as long as they establish prayer among you. If you then find anything detestable in them. You should hate their administration, but do not withdraw yourselves from their obedience.
Reference: Sahih Muslim 1855 a
In-book reference: Book 33, Hadith 101
USC-MSA web (English) reference(deprecated numbering scheme): Book 20, Hadith 4573