perfect candidate; one must therefore pursue the better of two good courses and avert the worse of two evils. Hence ‘Umar ibn al-Khattāb used to say:
“To You I complain of the vigor of the wicked and the incapacity of the trustworthy.”
The Prophet, may Allah bless him and grant him peace, and his Companions would rejoice at the victory of the Romans and Christians over the Magians, although both sides were unbelievers, because one group was closer to Islam. Allah revealed Surah al-Rūm concerning this when the Romans and Persians fought; the account is well known. Likewise, Joseph served as deputy to the Pharaoh of Egypt, though Pharaoh and his people were polytheists. Joseph established as much justice and goodness as he could and called them to faith to the extent possible.
Section
The general or restricted scope of public offices, and the authority an officeholder derives from his appointment, are determined by the wording used, the circumstances, and customary practice. Islamic law prescribes no fixed scope for these. Thus, in some places and periods, the jurisdiction of judges may include matters that fall under military and executive authority elsewhere or at another time, and vice versa. The same applies to hisba (public oversight) and financial administration.
All these offices are, in principle, forms of authority sanctioned by Islamic law and religious positions. Whoever acts justly in any of them, administering it with knowledge and justice and obeying Allah and His Messenger to the extent possible, is among the righteous and upright; whereas anyone who acts unjustly