Some scholars believe it was the prophet Jeremiah, but many others believe it was written by King David during his old age, possibly during Absalom’s rebellion or another troubled time. In Psalm 71 of the Book of Psalms that begins with “In you, Lord, I have taken refuge; let me never be put to shame”. It has no title in the Hebrew version, but it is numbered as Psalm 70 in the Greek and Latin translations. It is the prayer of an elderly man who trusts in the Lord and asks for his rescue and deliverance from his enemies.
Psalm 71:1-24 KJV: In thee, O Lord, do I put my trust: let me never be put to confusion. Deliver me in thy righteousness and cause me to escape incline thine ear unto me and save me. Be thou my strong habitation, whereunto I may continually resort thou hast given commandment to save me; for thou art my rock and my fortress. Deliver me, O my God, out of the hand of the wicked, out of the hand of the unrighteous and cruel man. For thou art my hope, O Lord God: thou art my trust from my youth. By thee have I been holden up from the womb: thou art he that took me out of my mother’s bowels: my praise shall be continually of thee. I am as a wonder unto many; but thou art my strong refuge. Let my mouth be filled with thy praise and with thy honour all the day. Cast me not off in the time of old age; forsake me not when my strength failed. For mine enemies speak against me; and they that lay wait for my soul take counsel together, Saying, God hath forsaken him: persecute and take him; for there is none to deliver him. O God, be not far from me: O my God, make haste for my help. Let them be confounded and consumed that are adversaries to my soul; let them be covered with reproach and dishonor that seek my hurt. But I will hope continually and will yet praise thee more and more. My mouth shall shew forth thy righteousness and thy salvation all the day; for I know not the numbers thereof. I will go in the strength of the Lord God: I will make mention of thy righteousness, even of thine only. O God, thou hast taught me from my youth: and hitherto have I declared thy wondrous works. Now also when I am old and grey-headed, O God, forsake me not; until I have shewed thy strength unto this generation, and thy power to everyone that is to come. Thy righteousness also, O God, is very high, who hast done great things: O God, who is like unto thee! Thou, which hast shewed me great and sore troubles, shalt quicken me again, and shalt bring me up again from the depths of the earth. Thou shalt increase my greatness, and comfort me on every side. I will also praise thee with the psaltery, even thy truth, O my God: unto thee will I sing with the harp, O thou Holy One of Israel. My lips shall greatly rejoice when I sing unto thee; and my soul, which thou hast redeemed. My tongue also shall talk of thy righteousness all the day long: for they are confounded, for they are brought unto shame, that seek my hurt.