A psalm of praise to God for His wisdom, majesty and power, and His deliverance of His own. This is David's longest psalm, and is found in 2 Sam 22. David rejoices in being delivered from his enemies (see Title).
v1-3: Introduction; David had become king (v35, 43, 50), and he looked back with gratitude on the Lord's dealings with Him. There is much personal testimony, "I love you...I take refuge...I call...I am saved."
The godly man had enemies, such as the Philistines (1 Sam 29), Amalekites (1 Sam 30), as well as other things mentioned here, the cords of death (v4-5), my distress (v6), deep waters (v16), my powerful enemy (v17), disaster (v18). The theme is that the godly man is saved from his enemies.
The titles of God; Lord, my strength, my rock, my fortress, my deliverer, my shield, the horn of my salvation, my stronghold; here is our guarantee of personal security. We find God is faithful, and we must trust Him at all times (Ps 62.8).
The 'stronghold' was a place in the centre of an ancient city, a secondary defence, a place of security. Even the most committed of enemies would be unable to breach it. The apostle Paul uses this word in a different context in 2 Cor 10.3-6.
v4-6: The final enemy, death itself. David had faced death very close, and writes these words from personal experience. In his distress he called out to the Lord, and He answered him.
v7-15: The glory and power of God. This power is manifested, demonstrating that God truly is God; He is not impotent, nor absent, nor uninvolved. His power cannot be doubted; when He speaks and breathes, there is mighty power, see v8, 13, 15. He is far greater than any other power.
He acts in the lives of real people, scattering the enemies of His people. His works are not random or capricious, for He is always righteous.
v16-19: This power came for David, and delivered him. God is mighty but despises no one; He is not so powerful that He does not care; such is the paradox which is God.
Again, we see David's personal testimony; He reached down, He drew me, He rescued me, He brought me, He rescued me; see 1 Sam 29.9-16. Whatever the enemy may say, he cannot take away a personal testimony of God's deliverance.
v20-24: See also Ps 15; a commitment to personal godliness. Here is a definite decision to do what is right, to live a life of integrity. God's power is not demonstrated randomly, but especially for His people. He works in us that we might become more like Him; He works divine holiness in our lives.
David kept himself from sin ('my iniquity', in one version); he was conscious of personal weakness, making no claim to perfection. Indeed, we know that David did fall seriously into sin. Verse 21 indicates the two sides of godly living; keeping the ways of the Lord, and turning from the ways of sin; both are necessary. David had confidence that God would honour such an attitude, contrast Job 35.3.
v25-27: God is never deceived by man, nor ignorant of man, and He deals fairly with people. So, the merciful man finds that God is merciful, the pure, the blameless, the devious likewise; our actions and attitudes are returned to us. It is in this way that God saves the humble, and brings the proud low.
v28-34: God gives strength to His people. He changes things in our lives, turning darkness to light, weakness to strength, and fear into boldness.
God's way is perfect (v30), and He makes our way perfect (v32). By His strength, I can do things which would otherwise be impossible (Dan 11.32); there are exploits to be done.
At the centre of this section (v31), God is unique, there is none like Him (1 Sam 2.2); we can know Him and enjoy His blessings; we can be like Him, and do His work.
v35: God gives to us, see v40, 48, Rom 8.32; His generosity knows no bounds.
v36: A wide and safe path to walk in; the safest place is where God wants us to be.
v37-42: David subdued many enemies, 2 Sam 5; 8; 12, as God protected and helped him. He completed the work thoroughly. He gained authority over nations, and received tribute from them; just as every knee shall bow at the Name of Christ.
The enemies cried out to God; but they were not His people, they did not live godly, so He could not hear them.
v43-45: Enemies amongst the people were also subdued; even here David knew victory, 1 Chr 22.18.
v46-50: David's final exultation of praise. God has brought him victory, and his proper response is praise. The Lord lives (v46); we do not pray to an inanimate object. There were victories over the nations, and God is to be praised among the nations.