1 Samuel 27:5-7

5 One day David said to Achish, ‘I hope that you are pleased with me. If you are, please choose a place for me to live in one of the small towns. I do not need to live in the same big city as the king.’

6 So on that day King Achish gave Ziklag town to David. Since then, Ziklag has always belonged to Judah's king. 7 David lived in the country of the Philistines for one year and four months.

27:6Ziklag was near the border of Judah. But it was far away from Saul's town of Gibeah and the five important Philistine towns.