When the Ammonites saw that the Arameans had run away, they also ran away from Abishai, and retreated into the town. So Joab went back to Jerusalem after fighting the Ammonites.
David also defeated the Moabites. He made them lie down on the ground, and he measured them with a length of cord. He measured two lengths for those to be killed, and one cord length for those to be allowed to live. So he made them subject to him and required them to pay taxes.
King David dedicated these gifts to the Lord, along with the silver and gold he had taken from all the following nations: Edom, Moab, the Ammonites, the Philistines, and Amalekites.
During that time David and his men were raiding the Geshurites, the Girzites, and the Amalekites. These people had lived in the land as far as Shur and Egypt from ancient times.