An illustration of this can be seen in the dilemma of a classroom school teacher. One student refuses to take correction and is a constant source of distraction in the classroom. In an effort to show mercy, the teacher may allow the behavior to continue for a while, hoping the child will change on his own. However, if the disruptive behavior is allowed to continue, the teacher’s intended mercy becomes a judgment on the obedient students in the room who are kept from learning because of the rebellion of that one student. To be righteous, the teacher must take action against the sin of the disobedient student. Her revealed wrath against that sin and her action taken to stop it are in keeping with the righteousness of God. Wrath on the guilty provides mercy for the innocent.
Source: McKenzie, M. S. (2002). Explorer's Bible Study: Romans, Galatians, and James (1:31). Dickson, TN: Explorer's Bible Study.