The rulers whom Allah has placed over the people possess enormous rights, just as those under their authority have weighty obligations toward them. The subjects must not defy their leaders, even if the rulers reserve certain privileges for themselves. Their duty is to give them hearing and obedience in both ease and hardship, in what pleases them and what displeases them—except when the matter involves disobedience to Allah. If the rulers command an act of disobedience, it is unlawful for them to issue such a command, and it is unlawful for anyone to follow them in disobeying Allah.
As for the claim voiced by some foolish individuals—“We are only obliged to obey the rulers when they are perfectly upright”—this is an error, indeed a grave mistake, and has no basis in the religion. It stems from the doctrine of the Khawarij, who insist that those in authority conform to Allah’s commands in every single matter. Such complete rectitude has not been seen for a very long time; circumstances have changed.
It is related that one of the Umayyad kings heard that people were criticizing him and his rule. He gathered the nobles and leading figures and addressed them: “You want us to be like Abu Bakr and ʿUmar?” They replied, “Yes; you are a caliph as they were caliphs.” He said, “Then become yourselves like the men of Abu Bakr and ʿUmar, and we will be like Abu Bakr and ʿUmar.” This was a remarkable answer, for when people themselves change, Allah inevitably changes the rulers set over them. “As you are, so will those appointed over you be.” For the populace to demand that their rulers emulate the Rightly Guided Caliphs while they themselves are far removed from the qualities of the caliphs’ companions is unreasonable. Allah is All-Wise: “And thus do We set some wrongdoers over others because of what they used to earn” (al-Anʿām 6:129).
They also recount that a man from the Khawarij who rose up against ʿAli ibn Abi Ṭālib