The best and worst of rulers
The Prophet (sal Allahu alaihi wa sallam) said, “The best of your rulers are those whom you love and who love you, and those who supplicate Allah in your favor and you supplicate Allah in their favor. 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.”
This Hadith identifies two categories of rulers. Firstly, those rulers who are well-wishers of people and provide them with justice. These are the best rulers for whom people also supplicate for.
Secondly, the worst rulers who are only concerned with their rule and interests and take no interest in providing justice to people and removing their difficulties. In fact, rulers are advised to adhere to justice, uprightness and equity as this can endear them to Allah as well as to people. Moreover, we are told that rebellion against rulers is disallowed till they commit a flagrant act of disbelief and stop abiding by the duties of Islam, particularly Salat (prayer).
And Allah knows best!