The Book on Government · The obligation to denounce rulers for that in which they go against Shari'ah, but they should not be fought so long as they pray regularly, etc
It has been narrated (through a different chain of tmnamitters) on the authority of Umm Salama (wife of the Holy Prophet) that he said: Amirs will be appointed over you, and you will find them doing good as well as bad deeds. One who hates their bad deeds is absolved from blame. One who disapproves of their bad deeds is (also) safe (so far as Divine wrath is concerned). But one who approves of their bad deeds and imitates them (is doomed). People asked: Messenger of Allah, shouldn't we fight against them? He replied: No, as long as they say their prayer. (" Hating and disapproving" refers to liking and disliking from the heart.)
It has been narrated on the authority of Umm Salama that the Messenger of Allah (ﷺ) said: In the near future there will be Amirs and you will like their good deeds and dislike their bad deeds. One who sees through their…
Another version of the tradition narrated on the same authority attributes the same words to the Messenger of Allah (ﷺ) except that it replaces kariha with ankhara and vice versa.
Another version omits a portion at the end of the tradition-a portion which begins with man radiya wa taba and ends with the last word of the tradition.