Where we are
Psalm 40 does something most of us do in prayer without noticing we are doing it: it looks back on a rescue with astonished gratitude, and then, in almost the same breath, asks to be rescued again. It is a thanksgiving that turns into a petition. And that shape is not a flaw in the psalm — it is the truth about a life of faith, where yesterday's deliverance and today's fresh trouble share the same page.
The superscription assigns it "to the chief Musician, A Psalm of David" (H5329, H4210, H1732) — a worship song, David's, handed to the temple's music director for public use. So this is not private journaling; it is a testimony written to be sung by a congregation, which is exactly what its middle section will demand.
Read the psalm honestly and you find three movements, not one. It opens in thanksgiving (vv. 1–3): a man drawn up out of a pit, his feet set on a rock, a new song put in his mouth. It rises through a meditation on trust and the uncountable works of God (vv. 4–5). Then, at its center, it turns startling: the singer reports that God did not, after all, want sacrifice and offering — and answers with a vow, "Lo, I come… I delight to do thy will" (vv. 6–8). He proclaims that righteousness openly (vv. 9–10). And then, without warning, the ground gives way again and the psalm becomes a plea from inside fresh trouble: "Be pleased, O LORD, to deliver me" (vv. 11–17).
Here is what to watch as it unfolds:
- The pit is behind him when the psalm opens. The rescue of verses 1–3 has already happened; the new song is already in his mouth. The psalm begins on the far side of a deliverance — which is what makes the trouble at the end so poignant.
- The center is bigger than David. Verses 6–8 say something a mere psalmist could not fully mean: that God set aside the whole sacrificial system in favor of a body given in obedience. The New Testament will hear the Son speaking here.
- Testimony is not optional. The rescued man does not keep the rescue to himself. "I have not refrained my lips" (v. 9). Gratitude that stays silent is not yet finished.
- The psalm ends unfinished. No tidy resolution — the last word is "make no tarrying, O my God" (v. 17). Faith is left mid-sentence, still asking, still trusting. That, too, is honest.
Canonically we are with David, c. 1000 BC, in the age of Israel's second and greatest king — the man whose own experience of being lifted out of danger became a vessel large enough to carry a prophecy of the One who would come from his line.
The pit and the new song (verses 1–3)
I waited patiently for the LORD; and he inclined unto me, and heard my cry. He brought me up also out of an horrible pit, out of the miry clay, and set my feet upon a rock, and established my goings. And he hath put a new song in my mouth, even praise unto our God: many shall see it, and fear, and shall trust in the LORD. — Psalm 40:1–3
The psalm opens with a verb doing patient work: "I waited patiently" (H6960), and the Hebrew doubles it for emphasis — literally waiting I waited. This is not passive idling; qavah is the taut, expectant waiting of a rope pulled straight, the same root behind Isaiah's "they that wait upon the LORD shall renew their strength" (Isa. 40:31). David waited the way a drowning man watches the surface — and "he inclined unto me, and heard my cry."
Then the picture that gives the psalm its power: "an horrible pit… the miry clay." The pit (H953) is a cistern or dungeon, a hole with no handholds; the clay (H2916) is the sucking mud at its bottom that pulls a man down as he struggles. It is the exact predicament of Jeremiah, lowered into a miry cistern until "Jeremiah sunk in the mire" (Jer. 38:6). Every reader has been in some version of it — the trouble you cannot climb out of by effort, because the harder you fight the deeper you sink.
And then the reversal, and note who does the verbs. He "brought me up" (H5927), "set my feet upon a rock" (H5553), "established my goings." The man in the pit does not save himself; he is lifted, planted, steadied. The rock is sela, a crag, solid footing where a moment ago there was only mud. Latter-day readers hear Helaman here without straining: "remember that it is upon the rock of our Redeemer, who is Christ, the Son of God, that ye must build your foundation" (Hel. 5:12). The feet that could find nothing to stand on in the clay are set, by another's hand, on the only ground that holds.
The last gift is a song. "He hath put a new song in my mouth" (H2319, H7892) — not merely a fresh tune but a new kind of praise, the song only a rescued person can sing, which no one who has never been in the pit can honestly perform. And the song is missionary from the start: "many shall see it, and fear, and shall trust in the LORD." One man's deliverance is meant to widen into many people's faith. This is the same instinct the Doctrine and Covenants names when it calls the song of the redeemed exactly that — "the song of redeeming love" (D&C 84:98–102). The rescued do not just feel grateful; they sing, and their singing pulls others toward the rope.
The messianic center — sacrifice not desired, "Lo, I come" (verses 6–8)
Between the new song and the psalm's crisis stands a meditation on trust — "Blessed is that man that maketh the LORD his trust" (v. 4) — and on the sheer uncountability of God's works and thoughts toward us: "they cannot be reckoned up in order unto thee… they are more than can be numbered" (v. 5). And then the psalm arrives at the verses for which it is a cornerstone.
A doctrinal note before the words, because these three verses are among the most important in the Psalter. What David sings here in the first person becomes, in the New Testament, the voice of Jesus Christ himself. Hebrews 10 takes these exact lines and puts them on the lips of the Son as he enters the world. So we read them twice: as David's true worship, and as the Savior's willing offering — and the second reading does not cancel the first. Handle them, as the ancients did, with reverence.
Sacrifice and offering thou didst not desire; mine ears hast thou opened: burnt offering and sin offering hast thou not required. Then said I, Lo, I come: in the volume of the book it is written of me, I delight to do thy will, O my God: yea, thy law is within my heart. — Psalm 40:6–8
Read the first line carefully, because it is easy to misread. "Sacrifice and offering thou didst not desire" (H2077, H4503, H2654) does not abolish the Mosaic altar — David lived under it and kept it. It ranks it. The whole prophetic tradition says the same thing: God does not want the animal instead of the obedient heart; he never did. "To obey is better than sacrifice, and to hearken than the fat of rams" (1 Sam. 15:22) — Samuel's rebuke to Saul, standing behind this psalm like its plainer echo. "I desired mercy, and not sacrifice" (Hosea 6:6). The blood on the altar was always a pointer; the thing it pointed to was a will surrendered to God.
Now the phrase at the heart of it, and its beautiful difficulty: "mine ears hast thou opened." The Hebrew is more vivid and stranger than the English — literally, ears thou hast dug for me (H241, H3738). Karah is the verb for digging a well or a pit; God has excavated the singer's ears, hollowed them out to hear and obey. It is the image of the servant whose ear is opened to his master's word — near cousin to the Exodus servant who loved his master and had his ear pierced at the doorpost as the sign that he would serve forever (Ex. 21:6). The dug ear is the obedient ear: hearing that has become doing.
Then the vow, unforgettable in its brevity: "Lo, I come" (H935) — hinneh vati, "behold, I have come." It is the answer of the volunteer, the whole self offered in a breath. "In the volume of the book it is written of me" — the roll, the scroll (H4039, H5612), the written decree in which this coming was already recorded. And the reason it is no burden: "I delight to do thy will, O my God" (H2654, H7522) — the same root, chaphets, that opened the passage ("thou didst not desire") now names the singer's own joy; what God delights to receive, the servant delights to give. "Yea, thy law is within my heart" (H8451) — not carved on stone tablets outside him, but internal, the covenant Jeremiah foresaw when God would "put my law in their inward parts, and write it in their hearts" (Jer. 31:33).
Now the fulfilment, handled with the honesty it deserves. The writer of Hebrews takes these verses and declares them the words of Christ at the incarnation:
Wherefore when he cometh into the world, he saith, Sacrifice and offering thou wouldest not, but a body hast thou prepared me: … Then said I, Lo, I come … to do thy will, O God. — Hebrews 10:5–7 (KJV)
Read the two side by side and one difference leaps out: where the Hebrew and the KJV Psalm read "mine ears hast thou opened," Hebrews reads "a body hast thou prepared me." This is not an error, and it is worth understanding rather than hiding. Hebrews is quoting the Septuagint, the ancient Greek Old Testament, which renders the sense rather than the letter: the opened ear — the whole obedient servant summoned to hear and do — is drawn out to its meaning, the prepared body offered up in that obedience. The dug ear and the prepared body are two ways of saying the same thing: a life given over, embodied, to do the will of God. Where the psalm's obedience is heard, Christ's obedience is incarnate — the Son takes a body precisely so that he can offer it. Both readings land on the identical truth the whole passage is driving toward: God wanted, not the blood of bulls, but a Son who would say "Lo, I come to do thy will," and mean it with his whole embodied life.
And when we hear the Son saying "Lo, I come," Latter-day scripture gives us the scene it comes from. Before the world was, in the council of heaven, when the Father asked whom he should send, "one answered like unto the Son of Man: Here am I, send me… Father, thy will be done, and the glory be thine forever" (Moses 4:1–2; cf. Abr. 3:27, "Here am I, send me"). That premortal volunteering is the same vow as Psalm 40:7 — Lo, I come — carried from the council into the flesh. And it was the whole shape of his mission: "I have suffered the will of the Father in all things from the beginning" (3 Ne. 11:11), and "I have drunk out of that bitter cup which the Father hath given me, and have glorified the Father in taking upon me the sins of the world, in the which I have suffered the will of the Father in all things" (3 Ne. 27:13–14). The animals on the altar are finished. What replaces them is not a better animal but a willing Son — the offering God desired all along.
The proclaimed righteousness (verses 9–10)
I have preached righteousness in the great congregation: lo, I have not refrained my lips, O LORD, thou knowest. I have not hid thy righteousness within my heart; I have declared thy faithfulness and thy salvation: I have not concealed thy lovingkindness and thy truth from the great congregation. — Psalm 40:9–10
The rescued man now does in public what the new song promised he would: he testifies. And the striking thing is the piling up of negatives — "I have not refrained… I have not hid… I have not concealed." Gratitude, in this psalm, is measured by what the mouth refuses to withhold. To keep a rescue quiet would be a kind of theft.
Note where he speaks: "in the great congregation" (H7227, H6951) — twice named, framing the whole passage. This is not private thanks whispered in a closet; it is open testimony before the assembled people of God. The verb "I have preached" (H1319, basar) is the root of the word for good news, gospel — the same family as Isaiah's "good tidings" (Isa. 52:7) and, through the Greek, euangelion itself. To preach righteousness is to announce good news; the rescued man has become an evangelist of his own deliverance.
And look at the fivefold list of what he refuses to hide: God's righteousness (H6664, tsedeq), his faithfulness (H530), his salvation (H8668), his lovingkindness (H2617, chesed, covenant love), and his truth (H571, emet). These are the great covenant words of the Old Testament — the attributes of the God who keeps his promises. The testimony is not about the singer's cleverness in escaping the pit; it is a catalogue of God's character. That is the difference between testimony and self-congratulation: the true witness talks about God.
There is a quiet second witness here again, if we hear the psalm christologically. The One who says "Lo, I come" is also the One who declares the Father's righteousness in the great congregation and hides nothing — "I have manifested thy name unto the men which thou gavest me" (John 17:6), "I have declared unto them thy name, and will declare it" (John 17:26). The willing offering and the open proclamation belong to the same Servant.
The closing plea in fresh trouble (verses 11–17)
And then the ground opens again. Without a seam, the psalm turns from testimony to petition, and the confident rescued voice becomes a voice in need:
Withhold not thou thy tender mercies from me, O LORD: let thy lovingkindness and thy truth continually preserve me. For innumerable evils have compassed me about: mine iniquities have taken hold upon me, so that I am not able to look up; they are more than the hairs of mine head: therefore my heart faileth me. — Psalm 40:11–12
This is the psalm's honesty, and it is why it belongs in every believer's hands. The man who was lifted out of one pit is now sinking into another — "innumerable evils have compassed me about," and worse, "mine iniquities have taken hold upon me." He cannot even lift his eyes ("I am not able to look up"), and "my heart faileth me." Deliverance in the past does not exempt him from trouble in the present; the new song and the fresh cry can live in the same throat. Anyone who has praised God for one rescue and then, months later, found themselves in a different pit knows this psalm from the inside.
Be pleased, O LORD, to deliver me: O LORD, make haste to help me. — Psalm 40:13
The petition is urgent and plain — "make haste." And here we should teach honestly: these closing verses (vv. 13–17) run nearly word-for-word parallel to Psalm 70, which is a short, standalone psalm made of almost this same prayer. Whether David reused his own petition, or a later editor lifted this urgent cry to stand on its own, we do not fully know — the ancient worshippers, like us, borrowed good prayers and prayed them again. There is nothing troubling in this. Scripture is a living book of prayer; the same words that ended one man's psalm could begin another's, because real need repeats, and God does not tire of being asked twice.
The psalm's turn outward is worth marking. Even in his own distress, the singer's prayer widens to include everyone who seeks God:
Let all those that seek thee rejoice and be glad in thee: let such as love thy salvation say continually, The LORD be magnified. — Psalm 40:16
And then the last verse, which is the whole psalm in miniature — need and confidence held together, unresolved and unashamed:
But I am poor and needy; yet the Lord thinketh upon me: thou art my help and my deliverer; make no tarrying, O my God. — Psalm 40:17
Sit with the two halves. "I am poor and needy" (H6041, H34) — ani and ebyon, the afflicted and the destitute, the two words the Old Testament reserves for those with nothing and no leverage. And against that emptiness, a single astonishing clause: "yet the Lord thinketh upon me" (H2803). The verb is chashab — to reckon, to plan, to hold in careful thought. The God who cannot number his own works toward us (v. 5) has, nonetheless, this one poor man held in his mind. That is the hinge of all comfort: not that the needy man is strong, but that he is thought of. And so the psalm can end on a command that is really an act of trust — "make no tarrying, O my God" — the last word not resolution but reliance.
The chapter's architecture
Psalm 40 is built as a deliberate two-part movement with a prophetic heart. The first half (vv. 1–10) is thanksgiving: the rescue from the pit (vv. 1–3), the meditation on trust and God's uncountable works (vv. 4–5), the messianic oracle at its center (vv. 6–8), and the open proclamation that flows from a grateful heart (vv. 9–10). Then the psalm pivots hard into lament and petition (vv. 11–17): the confession of fresh, innumerable trouble, the urgent cry to be delivered, and the closing rest in being thought upon by God. Thanksgiving pivoting into petition — the psalm honestly refuses to pretend that one deliverance ends all need.
The turn is genuine, not clumsy. A superficial reading calls verses 11–17 an awkward add-on; a truer one sees that the whole psalm is about this rhythm — that gratitude for yesterday and dependence for today are not rivals but companions in a life of faith. The rescued man of verse 2 and the poor and needy man of verse 17 are the same man, and both are speaking truth.
Teach two things honestly here. First, the parallelism: like all Hebrew poetry, this psalm thinks in matched pairs — "he inclined unto me" / "and heard my cry" (v. 1); "an horrible pit" / "the miry clay" (v. 2); "I have not hid" / "I have not concealed" (v. 10). The second line does not repeat the first so much as deepen it, and reading the pairs slowly is how the psalm is meant to be heard. Second, the near-duplication: verses 13–17 run closely parallel to the whole of Psalm 70. This is a real feature of the Psalter, not a problem to explain away — the same urgent prayer served in more than one setting, evidence that these were living, reusable prayers, prayed and re-prayed by a worshipping people. We do the same every time we pray a familiar phrase in a new trouble.
The one thing the psalm does not have is a strict chiasm, and it would be dishonest to impose one. Its shape is a forward movement — rescue, oracle, proclamation, fresh plea — with the willing-offering vow set like a jewel in the center of the first half. The artistry is in that placement: the deepest truth of the psalm, "Lo, I come… I delight to do thy will," sits not at the triumphant end but at the quiet middle, framed on one side by a rescue already received and on the other by a rescue still being begged for. Which is exactly where the Son's willing obedience belongs — at the center of everything, holding the whole of it together.
How this chapter changes the reader
Start where the psalm starts, in the pit — because most of us know the miry clay better than we know the rock. The first thing this psalm does to a reader is refuse to let deliverance be self-help. The verbs are all God's: he brought me up, he set my feet, he put a new song in my mouth. If you are in the clay right now, the psalm's counsel is not "climb harder"; it is "wait" — qavah, the taut, expectant waiting of a man who knows the hand that lifts is not his own. And it promises that on the far side there is a new song you cannot compose in advance, and that the song is not just for you: "many shall see it… and shall trust in the LORD."
Then let the center change how you think about sacrifice. Psalm 40 quietly relocates the whole question of what God wants from us. Not the animal — never really the animal. Not the outward performance we can complete while our heart stays elsewhere. What he wanted, the psalm says, was an opened ear and a willing will: "I delight to do thy will, O my God: yea, thy law is within my heart." And here is the mercy hidden in the christological reading: we could not offer that perfectly, so the Son did. When Hebrews puts these words in Christ's mouth — "a body hast thou prepared me… Lo, I come to do thy will" — it is telling us that the one willing offering God always wanted has already been made, in a body, on our behalf. Our obedience is no longer a payment we scrape together to buy God's favor; it is a grateful echo of an offering already perfect. We bring the opened ear because the Son first brought the prepared body.
And let the ending teach you how to hold gratitude and need in the same hand. The psalm does not end with everything resolved. It ends "poor and needy," still asking, "make no tarrying." That is not a failure of faith; it is what faith looks like most days — thanking God for the last pit while praying to be lifted out of the next one, and resting the whole weight of it on one clause we can barely believe is true: "yet the Lord thinketh upon me." He does. He thinks upon you by name, the way he thought upon a poor man in the tenth century BC and let his song of rescue grow, over a thousand years, into the very words his Son would speak coming into the world. If your psalm is unfinished tonight — gratitude and need in the same breath — you are exactly where Psalm 40 leaves its singer: on the rock, still crying out, and thought upon.