[Explanation]
Imam al-Nawawi—may Allah have mercy on him—writes in Riyad al-Salihin, under the chapter “The Just Ruler”: A walī (governor) is anyone placed in charge of any affair of the Muslims, whether public or private. Even a man within his own household is counted as a governor over them, for the Prophet ﷺ said, “The man is a shepherd over the members of his household and he will be questioned about his flock.”
Justice is obligatory even in a person’s dealings with himself, for the Prophet ﷺ said, “Indeed your own self has a right upon you, your Lord has a right upon you, your family has a right upon you, and your guest has a right upon you; so give each rightful claimant his due.”
Thus justice is required in every matter, yet it is even more emphatically required—indeed more pressing and greater—in the case of those who wield authority. When rulers abandon justice, disorder breaks out and people grow to resent a leader who has failed to act justly.
As for our stance toward an imam, a ruler, who does not uphold justice, it is to remain patient. We endure his oppression, his wrongdoing and his self-preferment. The Messenger of Allah ﷺ even counseled the Ansar, saying, “You will encounter favoritism after my time—others will prefer themselves over you—so be patient until you meet me at the Cistern.” Opposing the ruler breeds evils and corruption that are worse than his injustice.