Despite the latter-day dangers David had to endure, the earlier scenes of fleeing from Saul were still considered some of the most ominous of his life. David’s song of thanksgiving in 2 Samuel 22 begins, “David spoke the words of this song to the LORD on the day the LORD rescued him from the hand of all his enemies and from the hand of Saul” (2 Sam 22:1). Several themes emerge from David’s song of thanksgiving in 2 Samuel 22, a poem marked by stylistic elements like metaphor, parallelism, and bookending.
David described the Lord as his rock (2 Sam 22:2-3; 47-51). Moses, also writing toward the end of his life, described the Lord as a rock (Deut 32:4). This metaphor conveys the reality that the Lord is steadfast and immovable, unbending to the circumstances of the day. When David celebrated the Lord as his rock, he was speaking about the personal attribute of God’s unwavering faithfulness as the king’s refuge (2 Sam 22:3). David boasted, “The LORD lives—may my rock be praised! God, the rock of my salvation, is exalted” (2 Sam 22:47).
David recounted how the Lord rescued him from those too strong for him (2 Sam 22:4-20). Many times, David called to the Lord and was saved from his enemies (2 Sam 22:4). David described God’s saving actions in hyperbolic language: “The earth shook and quaked; the foundations of the heavens trembled; they shook because He burned with anger. Smoke rose from His nostrils, and consuming fire came from His mouth; coals were set ablaze by it” (2 Sam 22:8-9). David’s point was that the Lord’s saving actions were so profound that even natural elements felt the effects of His covenant love for the king and the people of Israel.
David reflected on how the Lord had rewarded him for his righteous acts (2 Sam 22:21-25). David described himself in a holistic sense—from his heroism before Goliath to his merciful acts toward the descendants of Saul. In each of these, David kept himself from covenant unfaithfulness to the degree that He could confess, “The LORD repaid me according to my righteousness, according to my cleanness in His sight” (2 Sam 22:24, 25). David was not claiming absolute purity of life, as the incident with Bathsheba in 2 Samuel 11 makes plain.
David praised the Lord for granting him success in his endeavors (2 Sam 22:32-46). David viewed the Lord’s salvation as a very practical matter. He wrote, “You have given me the shield of Your salvation; Your help exalts me…I pursue my enemies and destroy them; I do not turn back until they are wiped out” (2 Sam 22:36, 38).
Psalm 31 parallels the themes of 2 Samuel 22 and has significance for the storyline of Scripture. Phrases of suffering in Psalm 31 help to explain Jesus’ final hours.
(1) The concluding phrase of Ps 31:13 (“When they conspired against me, they plotted to take my life”) may have been on Matthew’s mind when he recorded that on the morning following the arrest of Jesus, “when daybreak came, all the chief priests and the elders of the people plotted against Jesus to put Him to death” (Matt 27:1//Mark 15:1//Luke 22:6).
(2) While Jesus could sympathize with David, Jesus’ suffering went beyond that of Israel’s king. Hanging on the cross, Jesus was both an innocent victim of human hatred and the propitiation God provided for the sins of the world. Jesus’ final words were the words of David in Ps 31:5a: “Into your hand I entrust my spirit” (Luke 23:46//Matt 27:50//Mark 15:37).

2 Samuel 23-24; Psalms 16, 71
David became proud during his final days and the nation suffered as a result. David’s arrogance in taking a census in 2 Samuel 24 stands in direct opposition to his confession of the Lord’s covenant mercy to him in 2 Samuel 23. David’s last words included a poetic reflection on his special relationship with the Lord (2 Sam 23:1-7). The Lord’s faithful love operated on the king’s behalf as he sought to expand Israel’s borders and defend God’s people from the marauding Philistines. The author followed David’s song of praise in 2 Samuel 22 by recounting the successes the king’s warriors enjoyed against Israel’s foes (2 Sam 23:8-39).
David’s military census was motivated by the Lord’s anger at David’s desire to look back over his accomplishments and boast in what he had done in Israel (2 Sam 24:1). Once the king learned that he had 800,000 fighting men in Israel and 500,000 in Judah (2 Sam 24:9), “David’s conscience troubled him” (2 Sam 24:10a). David confessed to the Lord, “I have sinned greatly in what I’ve done. Now LORD, because I’ve been very foolish, please take away Your servant’s guilt” (2 Sam 24:10b). David’s guilt would be taken away, but first the Lord punished David for his arrogance (2 Sam 24:11-17). David put himself in the hands of the Lord and the plague upon Israel resulted in the death of 70,000 people (2 Sam 24:15). David said to the Lord, “Look, I am the one who has sinned; I am the one who has done wrong. But these sheep, what have they done? Please, let Your hand be against me and my father’s family” (2 Sam 24:17). The plague finally ceased when David set up an altar on the threshing floor of Araunah the Jebusite (2 Sam 24:18-25).
Quantitatively speaking, the deaths of Uriah and David and Bathsheba’s baby can hardly compare with the 70,000 graves that had to be dug for those who died in the plague that followed David’s census. Yet, even after such a great disaster, the Lord’s mercy was not exhausted. Perhaps David wrote Psalm 16 sometime shortly after the plague had ceased, thoughts of the threshing floor of Araunah yet on his mind. There are several linguistic and conceptual connections between 2 Samuel 24 and Psalm 16: David’s need for God’s protection (2 Sam 24:24; Ps 16:1), David’s confession of affection for God’s people (2 Sam 24:17; Ps 16:3), terms common to geographic survey (2 Sam 24:2, 5-7; Ps 16:6), and nighttime conviction of sin (2 Sam 24:10-11; Ps 16:7). Because of the Lord’s covenant with David (2 Samuel 7), the king knew that even though he had committed such an arrogant and costly sin, he would not be damned for his actions. David confessed, “You will not allow Your Faithful One to see the Pit. Your reveal the path of life to me; in Your presence is abundant joy; in Your right hand are eternal pleasures” (Ps 16:9-11).
While these verses may cohere with the episode of 2 Samuel 24, they cast a long shadow down the storyline of Scripture, finding their ultimate fulfillment in Jesus Christ. In their first recorded sermons in Acts, both Peter and Paul cited themes of resurrection found in Psalm 16.
(1) On the day of Pentecost, Peter looked back on Ps 16:9-11 and saw in it a reference to Jesus’ resurrection. After quoting these verses to the crowd in Jerusalem (Acts 2:25-28), Peter went on to note that David, the author of Psalm 16, was dead and that David’s tomb was yet known in Israel (Acts 2:29). Peter understood that David had spoken prophetically of Jesus, whom God raised from the dead (Acts 2:32).
(2) In the synagogue of Pisidian Antioch, Paul preached that Jesus was David’s descendant and, through His resurrection, the fulfillment of God’s promises to Israel (Acts 13:16-41). In Paul’s logic, Jesus’ resurrection provided forgiveness and justification for everything that one could not be justified for under the law of Moses (Acts 13:37-39). It was this law that had guided Israel from the time of the exodus until God brought Jesus to Israel (Acts 13:17-23). In Paul’s mind, Jesus’ resurrection was the confirmation of Jesus’ status as the Messiah. Paul said, “For David, after serving his own generation in God’s plan, fell asleep, was buried with his fathers, and decayed”; he adds, “But the One whom God raised up did not decay” (Acts 13:34-37).
2 Samuel with Select Psalms and Proverbs Commentary Old Testament