How God Balances Justice With Mercy
God is not only the God of justice but also the God of mercy. Both His justice toward those who willfully disobey Him and His mercy toward those who respect Him enough to seek His help so they may obey Him are expressed in the second of His Ten Commandments.
It ends with these words: "For I, the LORD your God, am a jealous God, visiting the iniquity of the fathers on the children to the third and fourth generations of those who hate Me, but showing mercy to thousands [or, to the thousandth generation, NRSV], to those who love Me and keep My commandments" (Exodus 20:5-6).
God balances justice with mercy by considering what is in the heart—whether there remains any possibility of repentance. So long as that possibility exists, God is "not willing that any should perish but that all should come to repentance" (2 Peter 3:9). But there will come a time when those who refuse to repent will perish.
That is why the New Covenant administration of God's law considers first the attitude of the one who has sinned. One who is willing to "sin no more" is eligible for mercy instead of condemnation. But to those who choose to continue sinning Jesus says, "Unless you repent, you will all likewise perish" (Luke 13:3).