such as the Muʿtazilah, they regard fighting the rulers as one of the foundations of their religion.
The Muʿtazilah make the foundations of their religion five: divine oneness, which amounts to negating the divine attributes; justice, which amounts to denying divine decree; the position between the two positions; the fulfilment of the threat of punishment; and enjoining right and forbidding wrong, which includes fighting the rulers. I have discussed fighting the rulers elsewhere.
All of this falls under the general rule governing cases in which benefits and harms, or good and evil deeds, conflict or compete: precedence must be given to whichever carries greater weight when benefits and harms compete or conflict. Although enjoining and forbidding may secure a benefit and avert a harm, whatever weighs against doing so must also be considered. If the benefits thereby lost or the harms thereby incurred are greater, then such action is not commanded. Rather, it is forbidden if its harm outweighs its benefit.