Was David afraid of (1 Samuel 21:12) or friendly with Achish (1 Samuel 27:3; 29:6, 9)? Is there a contradiction?
It might be a good idea to find out why David was afraid of Achish in 1 Samuel 21. David had fled from Saul and went to the land of the Philistines. When the servants of Achish saw him, they informed the king that David was celebrated in the land of Israel as a man of war (21:11). Having been recognized and being alone among the Philistines, David was afraid. As a result, we’re told that he feigned madness before Achish, thus keeping himself from any harm (21:13-15).
By the time we get to chapter 27, David has a troop of 600 men with him (27:2). Even then, he sought to put some distance between himself and Achish, requesting a place to dwell outside the royal city (27:5). He was given the city of Ziklag (27:6).
In chapter 29, the Philistines were preparing to do battle with the Israelites. There was concern among the princes of the Philistines that David and his men were among them (29:2-3). Achish trusted David and thus defended him before the princes of his people. He had been in the land of the Philistines for multiple years by this time (29:3). There was no reason for David to fear Achish at this time.
There is no contradiction.
A response to 1001 Bible Contradictions.