Another explanation: A meditation of David. Rabbi Tarfon says: David praised the Holy One, blessed be He, greatly for the miracles that He had performed for him. The Holy One, blessed be He, said to David: David, you sing before Me about the downfall of Saul; if you had been Saul and he had been David, I would have lost many Davids before him. And this is the meaning of "a meditation of David".

He said before Him: Master of the Universe, did the Children of Israel not sing before You when You saved them from the sea? And even though Saul was pursuing me, I did not cease singing praises to You from my mouth. Why do I call upon You when he changes upon me at every moment and pursues me? Rabbi Yitzhak said: Just as David prayed that Saul would not fall into his hand, so did he pray that he himself would not fall into Saul's hand.

As it says (Psalms 144:10), "Who gives salvation to kings; Who rescued David His servant from the deadly sword." This refers to David and Saul. And afterward, he spread out his servant David's fame, for he did not lay his hand on Saul. David said: I had many enemies, and all of them were great, but none stood before me except Saul.

Therefore, it says (1 Samuel 22:18), "And on that day the Lord saved him from the hand of all his enemies, and from the hand of Saul." For he was equal to all his enemies.