Psalm 40 is a song written by David, most probably before he was king and when he was a fugitive from Saul. It was common in times of distress and hardship like this to reflect upon God’s past acts of salvation. The remembrance of these things acted as the faith-foundation for the prayer that would follow. It was also used as an appeal before God. There is a sense in which the psalmists could ‘remind God’ of his own faithfulness. To push this further they would then commend God’s faithfulness as a normative and firm principle upon which all people at all times could place their trust. It is almost as though the psalmist in this way is putting pressure upon God to answer. And yet all this is in accordance with the kind of boldness with which Jesus taught us to pray (Luke 18:1-6).
Verses 1-3 are testimonial. This section is one of the classic salvation-testimony statements of the psalms. The psalmist predicts that as a result of his testimony many people will put their trust in God (vs. 3). This leads to the pronouncement of blessing upon anyone who shall respond in this way (vs. 4). Verse 5 is notable in the way it refers to the wonders that God does for his people. These wonders are among ‘the things [God] planned for us’ and it is clear that this is only a fraction of what else lies within God’s purpose for his people. It seems that even the experience of being in the ‘mud and the mire’ was, in a mysterious way, a part of this plan ‘ as an occasion in which God’s name as saviour might be glorified.
Verses 6-8 are quite remarkable and it is easy to miss the significance of these words. The psalmist has been speaking of the wonders that God has planned for his people. It may be hard to see the logic behind the section that follows but it is quite a coherent transition. What kind of debt do we thus owe to such a good God? Surely the sacrifices and offerings of animals are entirely insufficient in themselves to express this debt (as verse 6 indicates). So David indicates that his ear has been pierced. The piercing of the ears of sheep indicated ownership toward a given purpose ‘ in this case it seems that David is expressing the fact that he himself is the offering that God has ‘earmarked.’ But here David speaks also in his official role as the anointed king of Israel and as the type of the ‘one to come’ (the Messiah). In this sense certain things have been written (prophesied) about him and he is expressing his willingness to fulfil this task ‘ to fulfil the purpose of God for him and to be the sacrificial offering that will cover the debt which the animal guilt offerings fell infinitely short of.
And so the next section (vs. 9-10) is a climactic expression of the faithfulness of God. David here places great significance upon corporate expressions of praise to God and his own public demonstration of thanks. He is not in favour of ‘private religion’ but rather insists that such acts of God call for God’s people to make a public demonstration of their gratitude and to tell openly and loudly of the faithfulness of God. The ‘great assembly’ is an important part of the spirituality of the psalms (see the article provided here on ‘the great assembly’). There appears to be a vital importance for the individual of having his/her own worship expressed and taken up in the corporate declaration. In this way the testimony of one is strengthened as it is reflected in the group. The psalms demands open testimony from the individual of the good things that God has done. Such testimony is an important part of the psalms corporate worship experience.
At verse 11 begins the prayer which is the occasion of the first part of the psalm. The focus here is now upon David’s individual situation of hardship. David has been working up to this prayer-point. He asks that God would not withhold from him the mercy that he has so freely shown so often in the past. What is remarkable here is the penitence that characterises David’s plea. He takes responsibility for the hardships he is enduring upon himself and expresses his consciousness of his moral dept toward God; he is overwhelmed by his sins. This state of penitence is a positive sign ‘ it is a result of the sharp spiritual awareness that he had gained as a result of the events described in the first part of the psalm. The closer we come to the holiness of God the more we perceive our own spiritual-moral depravity.
Verses 13-15 contain the specific request relating to David’s concrete situation at the time. He is being pursued by enemies who are desiring his destruction. Verse 15 compares with verse 16 as two types of fate. The psalmist is praying that things would simply work out justly. At the time of prayer it seemed that the one trusting in God was being put to shame whilst those who were proudly doing evil were rejoicing. But this should not be and the psalmist prays that this situation be turned the right way up: that the wicked would be ashamed and the righteous would rejoice because they trusted in God. The psalm finishes with an appeal to David’s own deplorable situation and to the covenant relationship (vs. 17). Through his covenant God had made himself the help and deliverer of his people, the one who takes away the curse and brings blessing, and now David prayers for this spiritual fact to be made a reality in his concrete situation.