Psalm 17

When All Else Fails, Turn to God

A Prayer of David.

1 Hear a just cause, O Lord; attend to my cry!
    Give ear to my prayer from lips free of deceit!
2 From your presence let my vindication come!
    Let your eyes behold the right!

3 You have tried my heart, you have visited me by night,
    you have tested me, and you will find nothing;
    I have purposed that my mouth will not transgress.
4 With regard to the works of man, by the word of your lips
    I have avoided the ways of the violent.
5 My steps have held fast to your paths;
    my feet have not slipped.

6 I call upon you, for you will answer me, O God;
    incline your ear to me; hear my words.
7 Wondrously show your steadfast love,
    O Savior of those who seek refuge
    from their adversaries at your right hand.

8 Keep me as the apple of your eye;
    hide me in the shadow of your wings,
9 from the wicked who do me violence,
    my deadly enemies who surround me.

10 They close their hearts to pity;
    with their mouths they speak arrogantly.
11 They have now surrounded our steps;
    they set their eyes to cast us to the ground.
12 He is like a lion eager to tear,
    as a young lion lurking in ambush.

13 Arise, O LORD! Confront him, subdue him!
    Deliver my soul from the wicked by your sword,
14 from men by your hand, O LORD,
    from men of the world whose portion is in this life.
You fill their womb with treasure;
    they are satisfied with children,
    and they leave their abundance to their infants.

15 As for me, I shall behold your face in righteousness;
    when I awake, I shall be satisfied with your likeness. – Psalm 17:1-15 ESV

In this Psalm of lament, David cries out to Yahweh (the LORD), begging Him to show mercy and dispense justice. David was going through an undisclosed difficulty that required Yahweh’s intervention. No details given as to the cause of David’s distress, but he clearly viewed his predicament as worthy of Yahweh’s attention.

Protect me from wicked people who attack me,
    from murderous enemies who surround me.
They are without pity. – Psalm 17:9-10 NLT

David begins his petition by declaring his innocence, claiming his lips are free from deceit. He is not duplicitous or hypocritical. In fact, he believes that Yahweh knows the condition of his heart and will affirm that his enemies are treating him unjustly.

You have tested my thoughts and examined my heart in the night.
    You have scrutinized me and found nothing wrong.
    I am determined not to sin in what I say.
I have followed your commands,
    which keep me from following cruel and evil people.
My steps have stayed on your path;
    I have not wavered from following you. – Psalm 17:3-5 NLT

David’s words have a hint of hubris to them. He seems a bit too self-confident and self-assured of his own righteousness. But David is not boasting of his own moral purity or declaring himself to be free from sin. He is simply stating that he had done nothing to deserve the unjust treatment of his antagonists.

David was a deeply flawed man who was well aware of his own shortcomings. He was all too familiar with his sinful predispositions but he remained firmly committed to Yahweh. That is why he invites Yahweh to examine his heart.

“. . . he requests God to ‘test’ his ‘heart’ (see 7:7), i.e., to put him through every conceivable examination. The probing (bahan, see 7:9) of ‘the heart’ (v. 3a) is a determination of the purity and integrity of the heart. Even as silver and gold underwent a refining process and were tested until the smith was satisfied with the purity of these precious metals, so the psalmist asks for an examination of his purity of devotion to God.” – Willem A. VanGemeren, "Psalms." In Psalms-Song of Songs. Vol. 5 of
The Expositor's Bible Commentary

David knew he couldn’t hide anything from Yahweh, for whom his heart was an open book. In Psalm 139, David discloses his awareness of Yahweh’s uncanny ability to see into the depths of his soul.

O Lord, you have examined my heart
    and know everything about me.
You know when I sit down or stand up.
    You know my thoughts even when I’m far away.
You see me when I travel
    and when I rest at home.
    You know everything I do.
You know what I am going to say
    even before I say it, Lord. – Psalm 139:1-4 NLT

Yahweh knew David’s thoughts before he could form them into words. Nothing remained hidden from the Almighty’s all-seeing eyes. In fact, David was so confident in Yahweh’s investigative skills that he begged to have his life examined so any secret sins could be exposed.

Search me, O God, and know my heart;
    test me and know my anxious thoughts.
Point out anything in me that offends you,
    and lead me along the path of everlasting life. – Psalm 139:23-24 NLT

David was not a self-deluded do-gooder blind to his own shortcomings. He was a pragmatic and practical man who understood the state of his own heart. In another Psalm, written not long after his elicit affair with Bathsheba and the murder of her husband, David wrote, “Behold, I was brought forth in iniquity, and in sin did my mother conceive me. Behold, you delight in truth in the inward being, and you teach me wisdom in the secret heart” (Psalm 51:5-6 ESV). 

So, Psalm 17 is not David’s attempt to whitewash over his sinfulness or to diminish his capacity to offend a holy and just God. He simply declares that his current conditions were not tied to his actions. He was innocent and the attacks of his enemies were undeserved and unrelenting.

They track me down and surround me,
    watching for the chance to throw me to the ground.
They are like hungry lions, eager to tear me apart—
    like young lions hiding in ambush. – Psalm 17:11-12 NLT

It’s important to remember that David was the king and had the power and authority to vindicate himself against any and all foes. With a word, David could call on the Israelite army and send his enemies running. He could have his enemies arrested, tried, and executed. But instead, David calls on God.

Arise, O Lord!
    Stand against them, and bring them to their knees!
    Rescue me from the wicked with your sword!
By the power of your hand, O Lord,
    destroy those who look to this world for their reward. – Psalm 17:13-14 NLT

David would have been familiar with the words spoken by Yahweh and recorded by Moses in the Book of Deuteronomy.

“Vengeance is mine, and recompense,
    for the time when their foot shall slip;
for the day of their calamity is at hand,
    and their doom comes swiftly.” – Deuteronomy 32:25 ESV

David viewed the attacks against him as an assault on Yahweh’s authority. While David was the recipient of their anger, Yahweh was the ultimate target. That’s why David called on Yahweh to intervene. David describes his opponents as those “who look to this world for their reward” (Psalm 17:14 NLT). They were worldly and godless. 

This doesn't mean these people were pagans or idolators. In fact, they could have been faithful Hebrews who viewed themselves as law-abiding Yahweh followers. Yet their actions disclosed the true condition of their hearts. The apostle Paul describes a similar problem when writing to the church in Philippi. There were those in the local congregation who claimed to be Christ-followers but whose actions disclosed something quite different.

For I have told you often before, and I say it again with tears in my eyes, that there are many whose conduct shows they are really enemies of the cross of Christ. They are headed for destruction. Their god is their appetite, they brag about shameful things, and they think only about this life here on earth. – Philippians 3:18-19 NLT

David knew that only Yahweh could tell the difference because He could see into the heart and disclose its condition. In the conflict he faced, David was willing to allow Yahweh to step in and adjudicate the outcome. He remained confident in his own innocence and Yahweh’s justice.

Because I am righteous, I will see you.
    When I awake, I will see you face to face and be satisfied. – Psalm 17:15 NLT

English Standard Version (ESV) The Holy Bible, English Standard Version. ESV® Permanent Text Edition® (2016). Copyright © 2001 by Crossway Bibles, a publishing ministry of Good News Publishers.

New Living Translation (NLT) Holy Bible, New Living Translation, copyright © 1996, 2004, 2015 by Tyndale House Foundation. Used by permission of Tyndale House Publishers Inc., Carol Stream, Illinois 60188. All rights reserved.