This is another article in the chapter Justice from the classical manual on Sharia called Reliance of the Traveller. The articles are posted one by one in the order they are given in the book.
THE OBLIGATORY CHARACI’ER OF OBEDIENCE TO THE CALIPH
025.5 (K: It is obligatory to obey the commands and interdictions of the caliph (N: or his representative (def: 025.7-10)) in everything that is lawful (A: meaning it is obligatory to obey him in everything that is not unlawful, offensive, or merely in his own personal interests), even if he is unjust, because of the hadith,
“Hear and obey, even if the ruler placed over you is an Ethiopian slave with amputated extremities,”
and because the purpose of his authority is Islamic unity, which could not be realized if obeying him were not obligatory. It is also obligatory for him to give sincere counsel to those under him to the extent that it is possible.)