When the Ammonites realized that Aram had fled, they retreated from before Abishai and entered the city. Then Joab turned away from fighting against the Ammonites, and he came to Jerusalem.
He also defeated Moab. He measured them with a length of rope, forcing them to lie down on the ground. He measured two lengths of rope to be put to death, but the entirety of one length he allowed to live. So the Moabites became subject to David, bearing tribute.
King David also dedicated these to the Lord, together with the silver and gold which he had carried away from all the surrounding nations, from Edom, Moab, the Ammonites, the Philistines, and Amalek.
David and his men went up and invaded the Geshurites, the Girzites, and the Amalekites. For they were inhabitants of the land from of old, as you come to Shur, even to the land of Egypt.