According to the superscription, David is the author of Psalm 31. And overall, the message of this psalm is confidence in God. Despite physical travail and the frustration of sins (Ps. 31:9–10), and despite the conspiracy of enemies and the rejection of neighbors (31:11), David has entrusted himself to the Lord.
In verse 5, a familiar line rings out: “Into your hand I commit my spirit.” Readers may recognize that line more from the scene of Christ’s cross than from the writings of David. Whereas verse 5 uses “hand” (singular), Jesus uses “hands” (plural). In Luke 23:46, Jesus said with a loud voice, “Father, into your hands I commit my spirit!” And then he died.
There are multiple sayings from Jesus at the cross in the passion scenes which the four Gospels report, but only in Luke 23:46 is there an allusion to Psalm 31:5. In fact, more than an allusion, Luke 23:46 is basically a quotation of the psalm line.
The context of Psalm 31 matters for the cross scene. In Psalm 31, David is experiencing bodily distress and the onslaught of his enemies. But David trusts in the Lord. God is his rock and fortress, his deliverer and stronghold (31:3).
Now behold the cross where the Son of David is dying. As a true and greater David, the Lord Jesus has faced the antagonism of his enemies, and he experiences the affliction of suffering in his body and heart. Whereas David dealt with his own sins, Jesus bore our iniquities upon his head as our perfect substitute and propitiation.
The scene of the cross was not one of despair, however. The words of David in Psalm 31:5 (“Into your hand I commit my spirit”) are words of confidence, and Jesus spoke those words of confidence in Luke 23:46. The cross was the result of the obedience of the Son of God, who satisfied divine judgment in the place of sinners and who entrusted himself to the Father.
No doubt weary from physical suffering and struggling for every breath, Jesus shouted the words of Psalm 31:5. The narrator said he called out “with a loud voice” (Luke 23:46). For those with ears to hear that day, they would have perceived the words of David from the lips of the man on the middle cross—words of confidence in God’s power to vindicate the righteous.
Not only were the words of Psalm 31:5 spoken by the Lord Jesus on the cross, they were the last words he spoke from the cross. According to Luke 23:46, “And having said this he breathed his last.” To “breathe his last” means to surrender his breath unto death.
Jesus’s use of Psalm 31:5 was about hope for vindication. That was David’s hope in the original context of the psalm, and the true and greater David rightly proclaimed such entrustment in his last breaths.
Keep in mind something else too. Jesus knew all of Psalm 31, not just verse 5. He knew what came later. David wrote, “Make your face shine on your servant; save me in your steadfast love!” (Ps 31:16).
When you die with Psalm 31:5 on your lips, the cry of confidence is in God who raises the dead. Jesus knew the cross was not the end, and he prayed from Psalm 31 in light of that hope. The validity of such trust was confirmed on the third day, when up from the grave he arose.