For the choir director; a psalm by David.
40 I waited patiently for the Lord.
He turned to me and heard my cry for help.
2 He pulled me out of a horrible pit,
out of the mud and clay.
He set my feet on a rock
and made my steps secure.
3 He placed a new song in my mouth,
a song of praise to our God.
Many will see this and worship.
They will trust the Lord.
4 Blessed is the person
who places his confidence in the Lord
and does not rely on arrogant people
or those who follow lies.
5 You have done many miraculous things, O Lord my God.
You have made many wonderful plans for us.
No one compares to you!
I will tell others about your miracles,
which are more than I can count.
6 You were not pleased with sacrifices and offerings.
You have dug out two ears for me.
You did not ask for burnt offerings or sacrifices for sin.
7 Then I said, “I have come!
(It is written about me in the scroll of the book.)
8 I am happy to do your will, O my God.”
Your teachings are deep within me.
9 I will announce the good news of righteousness
among those assembled for worship.
I will not close my lips.
You know that, O Lord.
10 I have not buried your righteousness deep in my heart.
I have been outspoken about your faithfulness and your salvation.
I have not hidden your mercy and your truth
from those assembled for worship.
11 Do not withhold your compassion from me, O Lord.
May your mercy and your truth always protect me.
12 Countless evils have surrounded me.
My sins have caught up with me so that I can no longer see.
They outnumber the hairs on my head.
I have lost heart.
13 O Lord, please rescue me!
Come quickly to help me, O Lord! [a]
14 Let all those who seek to end my life
be confused and put to shame.
Let those who want my downfall
be turned back and disgraced.
15 Let those who say to me, “Aha! Aha!”
be stunned by their own shame.
16 Let all who seek you rejoice and be glad because of you.
Let those who love your salvation continually say,
“The Lord is great!”
17 But I am oppressed and needy.
May the Lord think of me.
You are my help and my savior.
O my God, do not delay!