David and the Priests: 21:1-9; 22:1-23. David flees, weaponless and hungry, to Nob, where the tabernacle rests. There, Ahimelech, the priest helps David with food. He also turns over Goliath’s sword, which ks kept at the tabernacle as a trophy. Later an Edomite, Doeg, informs Saul that the priest has helped his enemy. In site of Ahimelech’s protests of innocence, Saul puts him and 85 other priests, with their families, to death.
4 And the priest answered David, and said, There is no common bread under mine hand, but there is hallowed bread; if the young men have kept themselves at least from women. 5 And David answered the priest, and said unto him, Of a truth women have been kept from us about these three days, since I came out, and the vessels of the young men are holy, and the bread is in a manner common, yea, though it were sanctified  this day in the vessel. 6 So the priest gave him hallowed bread: for there was no bread there but the shewbread, that was taken from before the Lord, to put hot bread in the day when it was taken away.
Psalm 52 and possibly 53 were written by David out of this tragic experience.
David flees to Gath: 21:10-15. David has only two choices. He can find a hiding place in Israel, or leave the country. At first David goes to Philistine, where he is recognized. Afraid for his life, David pretends madness. Psalms 56 and 34 flow from this experience, and reveal David’s inner torment.
10 And David arose, and fled that day for fear of Saul, and went to Achish the king of Gath. 11 And the servants of Achish said unto him, Is not this David the king of the land? did they not sing one to another of him in dances, saying, Saul hath slain his thousands, and David his ten thousands?