I Samuel - Chapter 27
Tricky, Tricky David
David knew that his business with Shaul wasn't finished. It was only a matter of time before he turned on him again. David decided to "get out of town." He took his men back to Gath. While his last escape there did not go well, by this time his struggles with Shaul were well known and King Achish was easily convinced that David had turned against his own people. David, his 600 men, and their families settled in Gath. Using the pretext that he didn't want to be a burden, David convinced Achish to give them their own town, Ziklag. (This town became the personal property of David and his descendants, rather than Tribal property of Judah.)
David and his men spent their time fighting enemies of Israel and looting their property, but he told Achish that they were raiding the neighboring Tribe of Judah. Achish believed that David had become disillusioned with his own people and that he was actually loyal to the Philistines.