And David said in his heart, "Now I shall perish someday by the hand of Saul. There is nothing better for me than that I should speedily escape to the land of the Philistines; and Saul will despair of me, to seek me anymore in any part of Israel. So I shall escape out of his hand."
Then David arose and went over with the six hundred men who were with him to Achish the son of Maoch, king of Gath.
So David dwelt with Achish at Gath, he and his men, each man with his household, and David with his two wives, Ahinoam the Jezreelitess, and Abigail the Carmelitess, Nabal's widow.
And it was told Saul that David had fled to Gath; so he sought him no more.
Then David said to Achish, "If I have now found favor in your eyes, let them give me a place in some town in the country, that I may dwell there. For why should your servant dwell in the royal city with you?"
So Achish gave him Ziklag that day. Therefore Ziklag has belonged to the kings of Judah to this day.
Now the time that David dwelt in the country of the Philistines was one full year and four months.
And David and his men went up and raided the Geshurites, the Girzites, and the Amalekites. For those nations were the inhabitants of the land from of old, as you go to Shur, even as far as the land of Egypt.
References for 1 Samuel 27:8
Whenever David attacked the land, he left neither man nor woman alive, but took away the sheep, the oxen, the donkeys, the camels, and the apparel, and returned and came to Achish.
Then Achish would say, "Where have you made a raid today?" And David would say, "Against the southern area of Judah, or against the southern area of the Jerahmeelites, or against the southern area of the Kenites."
David would save neither man nor woman alive, to bring news to Gath, saying, "Lest they should inform on us, saying, 'Thus David did.' " And thus was his behavior all the time he dwelt in the country of the Philistines.
So Achish believed David, saying, "He has made his people Israel utterly abhor him; therefore he will be my servant forever."