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.
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.