David and his men had marched north with Achish and the other Philistine kings for the battle in the Jezreel Valley between Mount Gilboa and the Hill of Moreh. The other Philistine kings rebuked Achish for bringing David and his men along because they did not trust that David would fight for them against his own people. So, David and his men made the three day journey of 50-60 miles from Aphek back to Ziklag in southern Judah. (Armies could travel about 15-20 miles per day.) When they arrived they found that their town had been overrun by the Amalekites. Their homes had been plundered and burned. All of their families had been taken as part of the plunder.
David and his men had decided after years of being hunted by Saul in Judah to seek refuge in the land of the Philistines for the sake of their families. In Ziklag these families had found a home and security, but with the invasion of the Amalekites all was lost.
The Amalekites attack on Ziklag may have been revenge for David using Ziklag as his base of operation against the Amalekites (1 Samuel 27:8). This coupled with the fact that David had led his men sixty miles away with the intention of fighting with the Philistines against their homeland of Israel while leaving all the families unprotected on the border of Amalekites territory easily led the frustrated and emotional men who had just lost their families to the conclusion that David needed to be stoned.
At this point David had been universally rejected and was completely alone without friend or family. Saul had convinced all of Israel that David was an insurgent, the Philistines did not trust David, cities in Judah had betrayed David, his family had been taken as plunder and his faithful 600 men believed it was time to stone David and rid the earth of his leadership. In his state of great stress “David found strength in the Lord his God.”
David’s thoughts and expressions in Psalm 25 may reflect his search for strength in God during this event:
“Turn to me and be gracious to me,
for I am lonely and afflicted.
Relieve the troubles of my heart
and free me from my anguish.
Look on my affliction and my distress
and take away all my sins.
See how numerous are my enemies
and how fiercely they hate me!
Guard my life and rescue me;
do not let me be put to shame,
for I take refuge in you.
May integrity and uprightness protect me,
because my hope, Lord, is in you.”
- Psalm 25:16-21