O you who believe, obey Allah, the Messenger, and those in command among you. If you disagree about something, refer it back to Allah and the Messenger, if you believe in Allah and the Last Day. That is the best thing to do and gives the best result. (Surat an-Nisa`: 59)
Hadith - Sahih Muslim 4569, Narrated Umm Salamah, r.a.
The Messenger of Allah (peace be upon him) said: In the near future there will be Amirs (rulers) and you will like their good deeds and dislike their bad deeds. One who sees through their bad deeds (and tries to prevent their repetition by his hand or through his speech), is absolved from blame, but one who hates their bad deeds (in the heart of his heart, being unable to prevent their recurrence by his hand or his tongue), is (also) safe (so far as God"s wrath is concerned). But one who approves of their bad deeds and imitates them is spiritually ruined. People asked (the Prophet): Shouldn't we fight against them? He replied: No, as long as they say their prayers.