Second: They do not regard obedience (1) to the imam as obligatory in everything he commands. Rather, they regard obedience to him as obligatory only in matters in which the Sharia permits him to be obeyed. They therefore do not permit obedience to him in disobedience to Allah, even if he is a just imam (2). When (3) he commands them to obey Allah and they obey him—such as by commanding them to establish (4) prayer, give zakat, be truthful and just, perform Hajj, and strive in the path of Allah—they have, in reality, obeyed Allah alone. If a disbeliever or an evildoer commands something that constitutes obedience to Allah, obeying Allah does not thereby become forbidden, nor does it cease to be obligatory merely because that evildoer commanded it. Likewise, if he speaks the truth, it is not permissible to reject his words as false, nor does following the truth cease to be obligatory merely because an evildoer has spoken it. Thus, Ahl al-Sunnah do not obey those in authority unconditionally; they obey them only insofar as this forms part of obedience to the Messenger—may Allah bless him and grant him peace—(5).
As Allah Most High says:
“Obey Allah, obey the Messenger, and those in authority among you.”
[Sūrat al-Nisā’: 59]
He commanded absolute obedience to Allah and commanded obedience to the Messenger, because the Messenger commands only obedience to Allah:
“Whoever obeys the Messenger has indeed obeyed Allah.”
[Sūrat al-Nisā’: 80]
He included obedience to those in authority within this, saying:
“and those in authority among you” (6)
He did not assign them a third, separate obedience, because one vested with authority is not obeyed unconditionally; rather, he is obeyed only (7) in what is right.