Verses 1-7
Psalms 52-54 Those who act treacherously
When David fled from Saul he obtained urgently needed provisions from the priests at Nob (1 Samuel 21:1-9). He was seen by Doeg, an Edomite and a servant of Saul, who reported the matter to Saul. In a typical fit of mad vengeance, Saul ordered Doeg to kill all the priests at Nob, something that Doeg was very willing to do (1 Samuel 22:6-23). On hearing of Doeg's butchery, David wrote a poem against him, which has been preserved in the Bible as Psalm 52 (see heading).
David denounces Doeg for his pride, treachery and hatred of all that is good (52:1-4). Doeg will surely meet a terrible death, which good people will recognize as a just punishment from God (5-7). His impending ruin is in contrast to the fruitfulness of the believer, who lives his life in the fellowship of God and his people (8-9).
Psalm 53 is a repetition of Psalm 14 with minor adjustments. The purpose in repeating it here was probably to add further comment on the character of Doeg described in the previous psalm. For notes on the psalm see commentary on Psalm 14.
Psalm 54 also belongs to the time of David's flight from Saul. It was written against the people of the town of Ziph, who betrayed David to Saul when they found that he was hiding in the wooded hills nearby (1 Samuel 23:19-24). David prays to God to save him and punish his enemies (54:1-5). Confident that God will hear him, he looks forward to the day when he can show his gratitude to God by sacrifice (6-7).