1 And David spoke to the LORD the words of this song in the day that the LORD had delivered him from the hand of all his enemies and from the hand of Saul.
2 And he said, "The LORD is my rock, my fortress, and my deliverer,
3 My God, my rock in whom I will trust. He is my shield and the horn of my salvation, my high tower and my refuge, my preserver. You save me from violence.
4 I will call on the LORD who is worthy to be praised. So I shall be saved from my enemies.
5 "When the waves of death compassed me, the floods of ungodly men made me afraid.
6 The sorrows of hell encompassed me. The snares of death seized me.
7 "In my distress I called upon the LORD and cried to my God. And he heard my voice out of his temple, and my cry entered into his ears.
8 "Then the earth shook and trembled. The foundations of heaven moved and shook because he was angry.
9 There went up a smoke out of his nostrils, and fire out of his mouth devoured. Coals were kindled by it.
10 He bowed the heavens also, and came down, and darkness was under his feet.
11 And he rode upon a cherub and flew, and he was seen upon the wings of the wind.
12 And he made darkness a pavilion around him, a gathering of dark waters and thick clouds of the skies.
13 Through the brightness before him coals of fire were kindled.
14 The LORD thundered from heaven, and the most High uttered his voice.
15 And he sent out arrows and scattered them, lightning, and completely defeated them.
16 And the channels of the sea appeared, the foundations of the world were laid open, at the rebuking of the LORD, at the blast of the breath of his nostrils.
17 "He sent from above and he took me. He drew me out of many waters.
18 He delivered me from my strong enemy, from those who hated me, for they were too strong for me.
19 They fell upon me in the day of my calamity, but the LORD was my support.
20 He brought me forth also into a large place. He delivered me because he delighted in me.
21 "The LORD rewarded me according to my righteousness. According to the cleanness of my hands he has recompensed me.
22 For I have kept the ways of the LORD and have not wickedly departed from my God.
23 For all his judgments were before me. And as for his statutes, I did not depart from them.
24 I was also upright before him and have kept myself from my iniquity.
25 Therefore, the LORD has recompensed me according to my righteousness, according to my cleanness in his eye-sight.
26 "With the merciful you will show yourself merciful, and with the upright man you will show yourself upright.
27 With the pure you will show yourself pure, and with the perverse you will contend.
28 And the afflicted people you will save, but your eyes are upon the haughty so that you may bring them down.
29 For you are my lamp, O LORD. And the LORD will lighten my darkness.
30 For by you I have run through a troop. By my God I have leaped over a wall.
31 As for God, his way is perfect. The word of the LORD is tried. He is a buckler to all those who trust in him.
32 "For who is God, except the LORD? And who is a rock, except our God?
33 God is my strength and power, and he makes my way perfect.
34 He makes my feet like hinds' feet and sets me upon my high places.
35 He teaches my hands to war so that a bow of steel is broken by my arms.
36 You have also given me the shield of your salvation, and your gentleness has made me great.
37 You have enlarged my steps under me so that my feet have not slipped.
38 I have pursued my enemies and destroyed them, and did not turn back until I had consumed them.
39 And I have consumed them and wounded them so that they could not arise. Indeed, they have fallen under my feet.
40 For you have girded me with strength to battle. Those who rose up against me you have subdued under me.
41 You have also given me the necks of my enemies so that I might destroy those who hate me.
42 They looked, but there was none to save, even to the LORD, but he did not answer them.
43 Then I beat them as small as the dust of the earth. I stamped them as the mire of the street and spread them abroad.
44 "You also have delivered me from the strivings of my people. You have kept me to be head of the heathen. A people which I did not know shall serve me.
45 Strangers shall submit themselves to me. As soon as they hear, they shall be obedient to me.
46 Strangers shall fade away and shall tremble from their close places.
47 "The LORD lives. Blessed be my rock. The God of the rock of my salvation is exalted.
48 It is God who avenges me, who brings down the people under me,
49 And who brings me forth from my enemies. You also have lifted me up on high above those who rose up against me. You have delivered me from the violent man.
50 "Therefore, I will give thanks to you, O LORD, among the heathen and I will sing praises to your name.
51 He is the tower of salvation for his king and he shows mercy to his anointed, to David, and to his offspring forevermore."
[v.1-51] - This song can be found in the Psalms as Psalm 18.
[v.29] - This verse can easily be linked with the ministry of Christ. Psalm 119:105 states that, "Your word is a lamp to my feet, and a light to my path." That is of course referring to God's word, or rather, His Word. The opening of John's Gospel reveals a wondrous fact about the Word of God: "In the beginning was the Word, and the Word was with God, and the Word was God" (John 1:1), and then, "And the Word was made flesh, and dwelt among us (and we beheld his glory, the glory as of the only begotten of the Father), full of grace and truth" (John 1:14). Christ is not only God's Word, He is also, "the light of the world," and concerning this Light He said, "He who follows me shall not walk in darkness, but shall have the light of life" (John 8:12). It is this Light that, "shines in darkness" (John 1:5), and is, "the true Light" (John 1:9).
[v.44] - "A people which I did not know shall serve me" - Reference, Isaiah 55:5.
[v.50] - Quoted in Romans 15:9.
[v.51] - "to his seed forevermore" - This is ultimately fulfilled in Christ, the eternal King. See the comment for 1st Samuel 16:1.