Some time afterward, the king of the Ammonites died, and his son Hanun succeeded him.
David said, "I will deal loyally with Hanun son of Nahash, just as his father dealt loyally with me." So David sent envoys to console him concerning his father. When David's envoys came into the land of the Ammonites,
the princes of the Ammonites said to their lord Hanun, "Do you really think that David is honoring your father just because he has sent messengers with condolences to you? Has not David sent his envoys to you to search the city, to spy it out, and to overthrow it?"
So Hanun seized David's envoys, shaved off half the beard of each, cut off their garments in the middle at their hips, and sent them away.
When David was told, he sent to meet them, for the men were greatly ashamed. The king said, "Remain at Jericho until your beards have grown, and then return."
When the Ammonites saw that they had become odious to David, the Ammonites sent and hired the Arameans of Beth-rehob and the Arameans of Zobah, twenty thousand foot soldiers, as well as the king of Maacah, one thousand men, and the men of Tob, twelve thousand men.
When David heard of it, he sent Joab and all the army with the warriors.
The Ammonites came out and drew up in battle array at the entrance of the gate; but the Arameans of Zobah and of Rehob, and the men of Tob and Maacah, were by themselves in the open country.
When Joab saw that the battle was set against him both in front and in the rear, he chose some of the picked men of Israel, and arrayed them against the Arameans;
the rest of his men he put in the charge of his brother Abishai, and he arrayed them against the Ammonites.
He said, "If the Arameans are too strong for me, then you shall help me; but if the Ammonites are too strong for you, then I will come and help you.
Be strong, and let us be courageous for the sake of our people, and for the cities of our God; and may the Lord do what seems good to him."
So Joab and the people who were with him moved forward into battle against the Arameans; and they fled before him.
When the Ammonites saw that the Arameans fled, they likewise fled before Abishai, and entered the city. Then Joab returned from fighting against the Ammonites, and came to Jerusalem.
But when the Arameans saw that they had been defeated by Israel, they gathered themselves together.
Hadadezer sent and brought out the Arameans who were beyond the Euphrates; and they came to Helam, with Shobach the commander of the army of Hadadezer at their head.
When it was told David, he gathered all Israel together, and crossed the Jordan, and came to Helam. The Arameans arrayed themselves against David and fought with him.
The Arameans fled before Israel; and David killed of the Arameans seven hundred chariot teams, and forty thousand horsemen, and wounded Shobach the commander of their army, so that he died there.
References for 2 Samuel 10:18
When all the kings who were servants of Hadadezer saw that they had been defeated by Israel, they made peace with Israel, and became subject to them. So the Arameans were afraid to help the Ammonites any more.