Joab said [to Abishai], “If the Arameans are too strong for me, then you shall help me; but if the Ammonites are too strong for you, I will come to help you.
When the Ammonites saw that the Arameans had fled, they also fled before Abishai and entered the city. So Joab returned from battling against the Ammonites and came to Jerusalem.
He defeated Moab, and measured them with a length of rope, making them lie down on the ground; he measured two lengths to [choose those to] put to death, and one full length to [choose those to] be kept alive. And the [surviving] Moabites became servants to David, bringing tribute.
King David also dedicated these to the Lord [setting them apart for sacred use], with the silver and the gold which he brought from all the nations: from Edom, Moab, the Ammonites, the Philistines, and from Amalek.
Now David and his men went up and raided the Geshurites, the Girzites, and the Amalekites [the enemies of Israel that Joshua had failed to annihilate]; for they had inhabited the land from ancient times, as one comes to Shur even as far as the land of Egypt. [Deut 25:19; Josh 13:1, 2, 13]
Then David [and his men] struck them down [in battle] from twilight until the evening of the next day; and not a man of them escaped, except four hundred young men who rode camels and fled.