Sayyidah Umm Salamah (may Allah be pleased with her) says that the Prophet (peace and blessings be upon him) said: "Soon there will come leaders (rulers) some of whose deeds you will recognise (as good) and some of which you will reject. Hisham said: Whoever rejects (them) with his tongue is free (of blame), and whoever dislikes (them) in his heart remains safe; but (as for) whoever is pleased and follows them." It was asked: O Messenger of Allah (peace and blessings be upon him)! Should we not fight them? He (peace and blessings be upon him) said: "No, as long as they keep praying."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / 16620