1 Samuel 30:2

And had taken the women captives, that were therein: they slew not any, either great or small, but carried them away, and went on their way.

While David was away with the Philistine army the Amalekites fell upon his city of Ziklag and plundered it. They took its inhabitants captive, including the women and the families of David and his men, with David's own wives and children among them, together with much spoil, and carried them away and went on their way. They put no one to death, either great or small. The town was left desolate.

The sudden disaster met David and his followers when they returned to the city. Its people were left grieving, and the strong warriors lifted up their voices and wept aloud until they had no more power to weep. The loss cut David off from every human support, for Saul had driven him from his country and the Philistines had driven him from the camp. Even his chosen men turned against him as the cause of the calamity, banding together and threatening him with death.

Swept of all he held dear on earth, David reviewed his past life and saw his mistake and encouraged himself in the Lord. When he called for the priest and inquired of the Lord he was heard, and deliverance and recovery of the captives was promised. That seeming misfortune was then reversed when he pursued the Amalekites and recovered everyone and everything that had been taken.

The raid shows that Amalekites had survived Saul's campaign, since his destruction of all was limited to those in the cities and nearby places where he fought, while others remained and later grew numerous and powerful enough to capture Ziklag. The episode belongs to David's victories over the Amalekites before he became king, and that victory was soon followed by his accession to the kingship of Judah.