EXPOSITION
HERE, again, the title is the best guide to the origin, intent, and authorship of the psalm. It is ascribed to David, and said to have been written on the occasion when Doeg the Edomite acquainted Saul with the fact of David's visit to Ahimelech the priest, recorded in 1 Samuel 21:1-9. This information led to a fearful massacre, in which Doeg himself took the chief part (1 Samuel 22:11-19). The bitterness of feeling displayed in the psalm is thus accounted for.
Metrically, the psalm seems to consist of three strophes, extending respectively to four, three, and two verses. In the first strophe Doeg's wickedness is set forth (1 Samuel 21:1-4); in the second (1 Samuel 21:5-7), he is threatened with God's vengeance; in the third (1 Samuel 21:8, 1 Samuel 21:9), David thanks God for the vengeance which he has executed, and declares his intention always to trust in him.