Some time later the king of the Ammonites died, and his son Hanun became king in his place.
Then David said, "I'll show kindness to Hanun son of Nahash, just as his father showed kindness to me." So David sent his emissaries to console Hanun concerning his father. However, when they arrived in the land of the Ammonites,
the Ammonite leaders said to Hanun their lord, "Just because David has sent men with condolences for you, do you really believe he's showing respect for your father? Instead, hasn't David sent his emissaries in order to scout out the city, spy on it, and overthrow it?"
So Hanun took David's emissaries, shaved off half their beards, cut their clothes in half at the hips, and sent them away.
When this was reported to David, he sent [someone] to meet them, since they were deeply humiliated. The king said, "Stay in Jericho until your beards grow back; then return."
When the Ammonites realized they had become repulsive to David, they hired 20,000 foot soldiers from the Arameans of Beth-rehob and Zobah, 1,000 men from the king of Maacah, and 12,000 men from Tob.
David heard about it and sent Joab and all the fighting men.
The Ammonites marched out and lined up in battle formation at the entrance to the city gate while the Arameans of Zobah and Rehob and the men of Tob and Maacah were in the field by themselves.
When Joab saw that there was a battle line in front of him and another behind him, he chose some men out of all the elite troops of Israel and lined up in battle formation to engage the Arameans.
He placed the rest of the forces under the command of his brother Abishai who lined up in battle formation to engage the Ammonites.
"If the Arameans are too strong for me," Joab said, "then you will be my help. However, if the Ammonites are too strong for you, I'll come to help you.
Be strong! We must prove ourselves strong for our people and for the cities of our God. May the Lord's will be done."
Joab and his troops advanced to fight against the Arameans, and they fled before him.
When the Ammonites saw that the Arameans had fled, they too fled before Abishai and entered the city. So Joab withdrew from the attack against the Ammonites and went to Jerusalem.
When the Arameans saw that they had been defeated by Israel, they regrouped.
Hadadezer sent [messengers] to bring the Arameans who were across the Euphrates River, and they came to Helam with Shobach, commander of Hadadezer's army, leading them.
When this was reported to David, he gathered all Israel, crossed the Jordan, and went to Helam. Then the Arameans lined up in formation to engage David in battle and fought against him.
But the Arameans fled before Israel, and David killed 700 of their charioteers and 40,000 foot soldiers. He also struck down Shobach commander of their army, who died there.
When all the kings who were Hadadezer's subjects saw that they had been defeated by Israel, they made peace with Israel and became their subjects. After this, the Arameans were afraid to ever help the Ammonites again.