David had witnessed firsthand the deliverance and salvation of His God. It wasn’t a matter of what others had told him, nor was it second-hand revelation. But he had seen first-hand in his own life how God was a rock, refuge and defender of the righteous and humble. In detail he describes the awesome power of the Lord, and it might not be what we expect to see. David describes the Lord as angry for the sake of His people, with smoke and fire and darkness. All creation is subject to the Lord, and His authority over the elements is clearly seen in David’s description. And in the midst of it all, God rescues His people (v. 16). David knew that those who set themselves against him would not prosper when God was on his side. David also knew that he was living a life pleasing to God, and he understood that God’s character was such that He is a Rewarder of those who seek Him and live righteously before Him.
In verses 25-27, David makes a curious statement about God. He says, “With the merciful You will show Yourself merciful; with a blameless man You will show Yourself blameless; with the pure You will show Yourself pure; and with the devious You will show Yourself shrewd. For You will save the humble people, but will bring down the haughty.”
That passage reveals an interesting characteristic about our God. In the way that relate to and treat others, He will relate to and treat us. Those who walk uprightly, in purity, in mercy, and in faithfulness will receive those things from the Lord, for these are what please Him. Those who walk in deviousness, in planning harm and taking from others, God will judge and take from them. The same pattern can be found in the Beatitudes in Matthew 5. The meek, the hungry, the merciful, the pure, and the peacemakers are shown the same by the Lord Himself.
David also describes how through the Lord, he can do powerful acts in His name and accomplish great things, because God is his source. And because David was living wholeheartedly for the Lord, he was given his heart’s desire on his enemies and in his life, according to the will of God. David knew the promises and the heart of God, and he lived by them consistently and faithfully in all that he did.