David didn't find security in his circumstances, kingdom, self-image, finances, power, friends, children, family background, or abilities. He found security in His God--a God who placed David in the line of the Messiah, and a God who fulfilled all His promises. Chosen as the king after Saul, David was perhaps an unlikely candidate for the throne--the youngest of 8 brothers. But God used him in mighty ways, regardless of his successes and failings. And David learn to trust in the God of his people, and he continued to praise God for who He was (is), and what He had done for him.
David knew the treasure of close, godly friends. He also knew the pain of confidants who turned on him. He knew what it was like when others supported him. And he knew what it was like when his sons fought amongst themselves for the throne. David knew peace and war. He knew dark sin and restoring forgiveness. He saw the power of God in creation and nature, and he knew the still small voice of conviction. He knew what it was like to be hunted, and he knew what it was like to be held in God's everlasting arms. David knew men who failed to keep promises, but he worshipped a God who kept an everlasting covenant with him.
And with that background, David wrote many of the Psalms we read today. Psalm 18 echos much of what we find in 2 Samuel 22, and as I read through David's life this week, it was a fitting conclusion to First and Second Samuel to end with David's song of praise to the Lord.
2 Samuel 22
The Lord is my rock and my fortress and my deliverer,
my God, my rock, in whom I take refuge, my savior; you save me from violence.
I call upon the Lord, who is worthy to be praised, and I am saved from my enemies.
The Lord thundered from heaven, and the Most High uttered his voice.
And he sent out arrows and scattered them; lightning, and routed them.
Then the channels of the sea were seen; the foundations of the world were laid bare,
at the rebuke of the Lord, at the blast of the breath of his nostrils.
He sent from on high, he took me; he drew me out of many waters.
He rescued me from my strong enemy, from those who hated me, for they were too might for me.
They confronted me in the day of my calamity, but the Lord was my support.
He brought me out into a broad place; he rescued me, because he delighted in me.
For you are my lamp, O Lord, and my God lightens my darkness.
For by you I can run against a troop, and by my God I can leap over a wall.
This God--his way is perfect; the word of the Lord proves true; he is a shield for all those who take refuge in him.
For who is God, but the Lord? And who is a rock, except our God?
This God is my strong refuge and has made my way blameless.
He made my feet like the feet of a deer and set me secure on the heights.
He trains my hands for war, so that my arms can bend a bow of bronze.
You have given me the shield of your salvation, and your gentleness made me great.
The Lord lives, and blessed by my rock, and exalted be my God, the rock of my salvation,
the God who gave me vengeance and brought down peoples under me,
who brought me out from my enemies; you exalted me above those who rose against me; you delivered me from men of violence.
For this I will praise you, O Lord, among the nations, and sing praises to your name.
Great salvation be brings to the king, and shows steadfast love to his anointed, to David and his offspring forever.
At the end of his song, David points to the Messiah who would later come.
The deliverance and ultimate triumph of David foreshadow that of the coming Messiah. At the end of his life, David looked back in faith at God's promises and forward in hope to their fulfillment in the coming of a future "king", the "anointed one". (MacArthur Study Bible, ESV)
This hope was the hope that David fortold of when he prophesied that the Christ would come and rule in the hearts of men one day. This hope was the hope that prompted David to pray these words before the assembly of the children of Israel:
Blessed are you, O Lord, the God of Israel our father, forever and ever. Yours, O Lord, is the greatness and the power and the gloy and the victory and the majesty, for all that is in the heavens and in the earth is yours. Yours is the kingdom, O Lord, and you are exalted as head above all. Both riches and honor come from you, and you rule over all. In your hand are power and might, and in your hand it is to make great and to give strength to all. And now we thank you, our God, and praise your glorious name.
(1 Chronicles 29:10-13)