Some time later, the king of the Ammonites died, and his son Hanun succeeded him as king.
David said, "I'll be loyal to Nahash's son Hanun, just as his father was loyal to me." So David sent his servants with condolences concerning Hanun's father. But when David's servants arrived in Ammonite territory,
the Ammonite officials asked their master Hanun, "Do you really believe David is honoring your father because he has sent you condolences? Of course not! David has sent his servants to you to search the city, spy it out, and overthrow it."
So Hanun seized David's servants and shaved off their beards,a cut off half their garments, from their buttocks down, and sent them off.
When this was reported to David, he sent men to meet them because they were completely ashamed. The king said, "Stay in Jericho until your beards have grown. Then you can come back."
When the Ammonites realized that they had offended David, they sent for and hired the Arameans of Beth-rehob and the Arameans of Zobah, totaling twenty thousand foot soldiers; the king of Maacah with one thousand soldiers; and twelve thousand soldiers from Tob.
When David heard this, he sent Joab with the entire army of warriors.
The Ammonites marched out and formed a battle line at the entrance to the city. The Arameans of Zobah and Rehob and the soldiers from Tob and Maacah remained in the countryside.
When Joab saw that the battle would be fought on two fronts, he chose some of Israel's finest warriors and deployed them to meet the Arameans.
The rest of the army Joab placed under the command of his brother Abishai. When they took up their positions to meet the Ammonites, Joab said,
"If the Arameans prove too strong for me, you must help me, and if the Ammonites prove too strong for you, I'll help you.
Be brave! We must be courageous for the sake of our people and the cities of our God. The LORD will do what is good in his eyes."
When Joab and the troops who were with him advanced into battle against the Arameans, they fled from him.
When the Ammonites saw that the Arameans had fled, they also fled from Abishai and retreated to the city. Then Joab returned from fighting the Ammonites and went to Jerusalem.
The Arameans saw that they had been defeated by Israel, so they regrouped.
Hadadezer sent for Arameans from beyond the Euphrates River. They came to Helam with Shobach leading them as commander of Hadadezer's army.
When this was reported to David he gathered all Israel, crossed the Jordan, and went to Helam. The Arameans formed battle lines against David and fought with him.
But the Arameans fled before Israel, and David destroyed seven hundred of their chariots and forty thousand horsemen. David wounded their army commander Shobach, and he died there.
When all the kings who served Hadadezer saw that they were defeated by Israel, they made peace with Israel and became their subjects. Never again would the Arameans come to the aid of the Ammonites.