nâqam - נָקַם (Strong's #5358)
The Hebrew verb נָקַם nâqam (Strong's #5358, x35) "avenge" first occurs in the Genesis 4:15 story of Cain's murder of Abel and subsequent fear that he would be sought out and killed himself. Instead, God says to him, "Therefore, whoever kills Cain, vengeance shall be taken on him sevenfold".
So the first record of a murder and its punishment in the Bible is actually treated with merciful banishment, of which Cain still complains (v.13), rather than an eye for an eye lethal stoning, so typical of our Old Testament perception of criminal punishment.
Another Old Testament misnomer, that it says little against slavery, is met in the rare sole doubled emphatic use of נָקַם nâqam in Exodus 21:20 "if a man beats his male or female servant with a rod, so that he dies under his hand, he shall surely be punished", the last phrase literally being, "avenged avengedly".
Maltreatment of a slave is met with in an even greater need for divine vengeance for it relates to someone in the owner's care and protection.
This actually helps us in the cases of God's vengeance over Israel's enemies and persecutors for Israel is like the slave, in God's care, and he is responsible for exercising justice when Israel was mistreated.
Again, a phrase reminiscent of New Testament Christian theology but taken from the heart of the Old Testament Law is Leviticus 19:18 "...you shall love your neighbour as yourself".
Oddly the first half of this verse is less often quoted, "You shall not take vengeance, nor bear any grudge against the children of your people". Loving thy neighbour is a response to deeds about which we would like to exercise vengeance whereas God requires us to leave this to him and to exercise the same mercy we would like meted out to ourselves.
Later in Leviticus 26:25 we meet verb and noun together, but clearly the translators are confused on how to render the phrase:
"And I will bring a sword against you that will execute the vengeance of the covenant" (NKJ)
"And I will bring a sword upon you, that shall avenge the quarrel of my covenant" (KJV)
"And I will bring the sword upon you to avenge the breaking of the covenant" (NIV)
Some prefer the idea "threat of punishment" but the covenantal idea is of the just and legal consequences of disobedience, to "carry out the terms" of the covenant.
In Deuteronomy 32:43 vengeance is paralleled with atonement, elsewhere it coincides with the idea of justice. It frequently appears in the phrase "the enemy and the avenger" (e.g., Psalms 8:2; 44:16).
Isaiah in his sole use aligns the verb with getting "rid of/relief from my adversaries, avenged of my enemeies" (1:24). Here he uses the almost identical sounding נָחַם nâcham (Strong's #5162, x108) which is only here not translated by its usual "comfort" or "repent".
Jeremiah is a more frequent user, some seven times, of נָקַם nâqam, in 5:9,29; 9:9 pairing it with "visit to chasten". A hint at its just rather than bloodthirsty revenge meaning is seen in 50:15 "it is the vengeance of the LORD; Take vengeance on her; As she has done, so do to her". In other words, vengeance is rooted in just response not excessive unmerited violence.
Vengeance is fair for it is a fair reply rather than a provocative first act. In this, the only person capable of true restraint, apart from the "turn the other cheek" Christian, Gandhi and Buddhist monk, is God himself, hence "vengeance is of the Lord" for we would only exercise angered revenge rather than tempered justice.
Indeed, Ezekiel 25:15 describes the Philistines as having "dealt vengefully and took vengeance with a spiteful heart, to destroy because of the old hatred",i.e., not exercising mercy.
However much we attempt to modify the strength and apparent violence of vengeance in the Bible it has to be admitted that the word in its Hebrew and also Arabic incarnation stems from angry punishment, though legitimate since it is a response not a provocation.
This is summed up in Nahum's threefold repetition of the verb in its last Old Testament usage:
"God is jealous, and the LORD avenges; The LORD avenges and is furious. The LORD will take vengeance on His adversaries, And He reserves wrath for His enemies." (Nahum 1:2)
To do nothing is to condone an act through non-response, vengeance as a biblically just response is a necessary part of justice and righteousness, and is predominantly exercised by God with occasionally man as his instrument.