BDBD is Psalm 54:5-7

David is not invoking a curse on the Ziphites. Actually, the imprecation in verse 5 is not that at all. Rather, it is an appeal to God to redress wrongs perpetrated against the psalmist by imposing penalties commensurate with the violence in accordance with the normal judicial procedure in human court. He wanted justice done by the hand of God. Perhaps in part because King Saul controlled the human courts. Most definitely because he lived by the word of God.

David knew that he who has been wronged is not to right that wrong by his own hand but is to leave redress to the Lord, who says, “It is mine to avenge. I will prepay”. (Deuteronomy 32:35; Proverbs 20:22; Romans 12:19) Therefore, David appeals his case to the divine Judge. (Jeremiah 15:15) He will not be a vigilante. One person cannot be the arrestor, prosecutor, judge, sentencer, and executioner; especially for crimes upon themselves.

The Apostle Paul wrote to the Roman congregation, “Do not repay anyone evil for evil. Be careful to do what is right in the eyes of everybody. If it is possible, as far as it depends on you, live at peace with everyone. Do not take revenge, my friends, but leave room for God’s wrath, for it is written: “It is mine to avenge; I will repay,” says the Lord. On the contrary: “If your enemy is hungry, feed him; if he is thirsty, give him something to drink. In doing this, you will heap burning coals on his head. Do not be overcome by evil, but overcome evil with good.” (Romans 12:17-21)