To the chief musician, a psalm of David: In the Lord I have taken refuge. This is what the verse says, "The Lord is with me; I will not be afraid" (Psalm 118:6). It can be compared to a king who had a servant whom he loved, but his other servants were jealous of him. The king said, "Whoever is compassionate towards me, I am grateful to him." "Nodi" should be read as "Nodu" (meaning "flee"), as Rabbi Acha said, "When Israel was exiled, the nations of the world rejoiced and tried to remove them from their place." Rabbi Acha explained that the verse "Like a bird wandering from its nest, so is a man wandering from his place" (Proverbs 27:8) refers to the Lord, who is a warrior and has no place other than the Temple, as it says, "This is my resting place forever and ever" (Psalm 132:14).
Where David Ran When Enemies Surrounded Him
Midrash Tehillim 11:1