Three days later David and his men arrived back in Ziklag. Some Amalekites had raided the Negev and Ziklag. They had attacked Ziklag and burned it down. They had captured the women and everyone else there, young and old. They hadn't killed anyone, but they took everyone with them as they left.
When David and his men arrived back in town, they found it burned to the ground, and their wives and children captured. David and his men cried loudly until they couldn't cry any more. David's two wives had also been taken as prisoners—Ahinoam from Jezreel and Abigail, Nabal's widow, from Carmel. David was in a great deal of trouble, because the men were so upset over losing their children that they began to talk of stoning him.
But trusting in the Lord his God, David went to Abiathar the priest, the son of Ahimelech, and said, “Bring me the ephod.” Abiathar brought it to him. David asked the Lord, “Should I chase after these raiders? Will I catch up with them?”
“Yes, chase after them,” the Lord replied, “for you will definitely catch up with them and rescue the prisoners.”
David and six hundred of his men set off for the Besor Valley. 10 Two hundred of them remained behind there because they were too tired to cross the valley while David continued on with four hundred men.
11 They came across an Egyptian in the countryside and they took him to David. They gave him some food to eat and water to drink. 12 They also gave him a piece of a fig cake and two raisins cakes. He ate them and recovered, because he hadn't had any food or water for three days and nights.
13 “Whose slave are you, and where do you come from?” David asked him.
“I'm an Egyptian,” he replied, “the slave of an Amalekite. My master left me behind three days ago when I got sick. 14 We raided the Kerethites in the Negev, as well as the part that belongs to Judah, and the Negev of Caleb. We burned Ziklag too.”
15 “Can you lead me to these raiders?” David asked.
“If you swear to me by God that you won't kill me or hand me over to my master, then I'll take you to them,” the man replied.
16 He led David to the Amalekites, where they were spread out all over the place, eating, drinking, and dancing because of the large haul of plunder they had taken from the lands of the Philistines and of Judah. 17 David attacked them from dusk until the following evening. Nobody escaped, except for four hundred men who managed to get away, riding on camels. 18 David got back everything the Amalekites had taken, including his two wives. 19 Everything was accounted for—all the adults and children, as well as all the plunder the Amalekites had taken. David brought everything back. 20 He also recovered all the flocks and herds. His men drove them ahead of the other livestock, shouting, “This is David's plunder!”
21 When David got back to the two hundred men who had been too tired to continue with him from the Besor Valley, they came to meet him and the men with him. As David approached the men to greet them, 22 all the unpleasant, good-for-nothing men of those who had gone with David said, “They weren't with us, so we won't share the plunder that we took, except to give them back their wives and children. They can take them and leave.”
23 But David intervened, saying, “No, my brothers, you shouldn't do this with what the Lord has given us. He has protected us and handed over to us the raiders that had attacked us. 24 Who's going to listen to you when you say such things? Whatever share those who went into battle receive will be the same as those who stayed to guard the supplies.” 25 David made this the rule and regulation for Israel from that day until now.
26 When David got back to Ziklag, he sent some of the plunder to each of his friends among the elders of Judah, saying, “Here's a gift for you from the plunder of the Lord's enemies.” 27 David sent it to those who lived in Bethuel,* “Bethuel”: far more likely than “Bethel” as in the Hebrew text. Ramoth Negev, Jattir, 28 Aroer, Siphmoth, Eshtemoa, 29 Racal, and the towns of the Jerahmeelites and Kenites, 30 Hormah, Bor-ashan, Athach, 31 Hebron—all the places David and his men had gone to.

*30:27 “Bethuel”: far more likely than “Bethel” as in the Hebrew text.