In contemporary democracies, backsliding typically occurs through legal machinations. Self-enforcing democracy requires that political parties refrain from exploiting legal opportunities to tilt electoral rules. Using a formal model, we argue that informal norms of mutual forbearance and formal constitutional rules are fundamentally intertwined via a logic of deterrence. By circumscribing how far each party can legally bend the rules, legal bounds create reversion points if mutual forbearance collapses. If legal bounds are symmetric between parties, they deter electoral tilting by making credible each party's threat to punish transgressions by the other. If legal bounds become sufficiently asymmetric, however, the foundations for forbearance crumble. Asymmetries emerge when some groups (a) are more vulnerable than others to legally permissible electoral distortions and (b) favored and disfavored groups sort heavily into parties. We apply this mechanism to explain gerrymandering and voting rights in the United States in the post-Civil Rights era.