David's next refuge also proved to be insecure. It is a mystery why he sought refuge with Goliath's sword in that giant's hometown. As Chuck Swindoll once said, David would have been as conspicuous in Gath as Dolly Parton in a convent. Evidently he thought he would be welcome in Gath since he was fleeing from Saul. Perhaps he went there since Achish was an enemy of Saul's, as David was. The people identified him at once and called him Israel's king (v. 11). This may have been a slight on his authority; they may have meant that he was only a local ruler (cf. Josh. 12:7). Alternatively they may have heard of David's anointing as Israel's next king. In any case Achish's advisers took David's presence as a threat (v. 11; cf. 29:1-5). Perhaps they felt as the American president might have felt if a high ranking Russian general defected and sought asylum in the United States during the Cold War. The potential of his helpfulness against the enemy needed weighing against the chance that he would prove disloyal, turn on his host, and do much damage.
David sensed his personal danger and pretended to be insane to save his life. Evidently Achish dismissed him concluding that David was mad and could be of no help to him against Saul (cf. 29:3, 6, 9; Ps. 34 title). Furthermore ancient Near Easterners regarded the insane as harbingers of evil and so avoided them.
". . . insanity was often believed in the ancient world to be an affliction of the gods, and it was customary to treat madmen as taboo if not holy, people who should not be harmed in any way."229
In both Nob and Gath David resorted to deception to protect himself, and in each place some bad consequences resulted. Doeg killed the priests, and David had to abandon Gath. However, he also trusted in the Lord. He wrote Psalms 56 and 34 during and after his time in Gath, according to the titles of those psalms. They reveal that he was trusting God. His ultimate hope for provision and protection was not the priests or Saul's enemies but the Lord Himself. This faith undoubtedly explains the fact that God preserved him and some good consequences came out of these experiences. David had two more encounters with Achish both of which were beneficial for David. 1 Samuel 21 helps us see the mixture of right and wrong in David's actions, but David's psalms clarify the proper response that the godly should make when opposition assails us.