In the course of time, the king of the Ammonites died, and his son Hanun succeeded him as king.
David thought, "I will show kindness to Hanun son of Nahash, just as his father showed kindness to me." So David sent a delegation to express his sympathy to Hanun concerning his father. When David's men came to the land of the Ammonites,
the Ammonite nobles said to Hanun their lord, "Do you think David is honoring your father by sending men to you to express sympathy? Hasn't David sent them to you to explore the city and spy it out and overthrow it?"
So Hanun seized David's men, shaved off half of each man's beard, cut off their garments in the middle at the buttocks, and sent them away.
When David was told about this, he sent messengers to meet the men, for they were greatly humiliated. The king said, "Stay at Jericho till your beards have grown, and then come back."
When the Ammonites realized that they had become a stench in David's nostrils, they hired twenty thousand Aramean foot soldiers from Beth Rehob and Zobah, as well as the king of Maacah with a thousand men, and also twelve thousand men from Tob.
On hearing this, David sent Joab out with the entire army of fighting men.
The Ammonites came out and drew up in battle formation at the entrance to their city gate, while the Arameans of Zobah and Rehob and the men of Tob and Maacah were by themselves in the open country.
Joab saw that there were battle lines in front of him and behind him; so he selected some of the best troops in Israel and deployed them against the Arameans.
He put the rest of the men under the command of Abishai his brother and deployed them against the Ammonites.
Joab said, "If the Arameans are too strong for me, then you are to come to my rescue; but if the Ammonites are too strong for you, then I will come to rescue you.
Be strong and let us fight bravely for our people and the cities of our God. The LORD will do what is good in his sight."
Then Joab and the troops with him advanced to fight the Arameans, and they fled before him.
When the Ammonites saw that the Arameans were fleeing, they fled before Abishai and went inside the city. So Joab returned from fighting the Ammonites and came to Jerusalem.
After the Arameans saw that they had been routed by Israel, they regrouped.
Hadadezer had Arameans brought from beyond the River; they went to Helam, with Shobach the commander of Hadadezer's army leading them.
When David was told of this, he gathered all Israel, crossed the Jordan and went to Helam. The Arameans formed their battle lines to meet David and fought against him.
But they fled before Israel, and David killed seven hundred of their charioteers and forty thousand of their foot soldiers. He also struck down Shobach the commander of their army, and he died there.
When all the kings who were vassals of Hadadezer saw that they had been defeated by Israel, they made peace with the Israelites and became subject to them. So the Arameans were afraid to help the Ammonites anymore.
In the spring, at the time when kings go off to war, David sent Joab out with the king's men and the whole Israelite army. They destroyed the Ammonites and besieged Rabbah. But David remained in Jerusalem.