Psalm 51 is a prayer of repentance. David prayed this prayer when the prophet Nathan went to him, after he had gone into Bathsheba.
Have mercy upon me, O God,
According to Your loving-kindness;
According to the multitude of Your tender mercies,
Blot out my transgressions.
2 Wash me thoroughly from my iniquity,
And cleanse me from my sin.
3 For I acknowledge my transgressions,
And my sin is always before me.
4 Against You, You only, have I sinned,
And done this evil in Your sight—
That You may be found just when You speak,
And blameless when You judge.
5 Behold, I was brought forth in iniquity,
And in sin my mother conceived me.
6 Behold, You desire truth in the inward parts,
And in the hidden part You will make me to know wisdom.
7 Purge me with hyssop, and I shall be clean;
Wash me, and I shall be whiter than snow.
8 Make me hear joy and gladness,
That the bones You have broken may rejoice.
9 Hide Your face from my sins,
And blot out all my iniquities.
10 Create in me a clean heart, O God,
And renew a steadfast spirit within me.
11 Do not cast me away from Your presence,
And do not take Your Holy Spirit from me.
12 Restore to me the joy of Your salvation,
And uphold me by Your generous Spirit.
13 Then I will teach transgressors Your ways,
And sinners shall be converted to You.
14 Deliver me from the guilt of bloodshed, O God,
The God of my salvation,
And my tongue shall sing aloud of Your righteousness.
15 O Lord, open my lips,
And my mouth shall show forth Your praise.
16 For You do not desire sacrifice, or else I would give it;
You do not delight in burnt offering.
17 The sacrifices of God are a broken spirit,
A broken and a contrite heart—
These, O God, You will not despise.
18 Do good in Your good pleasure to Zion;
Build the walls of Jerusalem.
19 Then You shall be pleased with the sacrifices of righteousness,
With burnt offering and whole burnt offering;
Then they shall offer bulls on Your altar.
Come now, therefore, and I will send you to Pharaoh that you may bring My people, the children of Israel, out of Egypt.”
But Moses said to God, “Who am I that I should go to Pharaoh, and that I should bring the children of Israel out of Egypt?”
So He said, “I will certainly be with you. And this shall be a sign to you that I have sent you: When you have brought the people out of Egypt, you shall serve God on this mountain.”
Then Moses said to God, “Indeed, when I come to the children of Israel and say to them, ‘The God of your fathers has sent me to you,’ and they say to me, ‘What is His name?’ what shall I say to them?”
And God said to Moses, “I AM WHO I AM.” And He said, “Thus you shall say to the children of Israel, ‘I AM has sent me to you.’” 15 Moreover God said to Moses, “Thus you shall say to the children of Israel: ‘The Lord God of your fathers, the God of Abraham, the God of Isaac, and the God of Jacob, has sent me to you” (Exodus 3:10-14).