This psalm was written by David when he was betrayed by the Ziphites when he was on the run from Saul. Ziph was a small town south of Hebron in the territory of Judah. Since David was of the tribe of Judah, he would have expected the Ziphites to be friendly towards him. But this was not the case and we can read about their treachery in 1 Samuel 23:19-23 (they were to betray him again in 1 Samuel 26:1-3). What could David do in response to such disappointments? He could pray to God.
In verse 1, David prays for deliverance and vindication. When he asks God to save by his name, David has in mind God’s character and nature. It is true that God’s names reveal features of his character and it is helpful to meditate on these names. But David probably is appealing to God’s entire character, a character that is marked by faithfulness to his promises and to his people. How different God is in comparison with the unfaithful Ziphites!
The Ziphites may have seemed very powerful, especially when they had Saul’s support. Yet David knew that God was more powerful than any combination of enemies, and therefore he prayed confidently for vindication. Vindication is not the same as revenge, and it is important to maintain the difference. The status of David was bound up with the future of God’s cause and it was appropriate for him to want vindication.
David prayed vocally (v. 2), perhaps a sign of his earnestness in this matter. He details the characters of his opponents, and mentions their cruel intentions, which arose from the fact that they paid no heed to God’s covenant (v. 3). In these petitions, he is not informing God about his opponents; instead David is presenting arguments as to why God should deal with them and help him.
The psalmist also relates his relationship with God, and does so with a sense of wonder (note his use of the term ‘Behold’). David is confident that the Lord will help him and protect him. God’s faithfulness to his character will result in judgement on those who had shown such treachery towards David (vv. 4-5).
David expresses his gratitude by promising to offer a specific sacrifice of thanksgiving at the tabernacle (v. 6). He determined to do so because he had discovered that his God had lived up to his name. The Lord had provided complete deliverance from the intentions and schemes of his opponents (v. 7).
Although David wrote this psalm in connection to a particular act of treachery, its sentiments could be repeated many times in his life. And we also can say the same. We should pray to God whenever we are opposed or disappointed by others, and do so with the knowledge that God will deliver us according to his character and power.