2 Samuel 10
David Defeats the Ammonites 1
Some time after this, King Nahash 
of the Ammonites died, and his son Hanun became king.
David said, "I am going to show loyalty to Hanun just as his father, Nahash, was always loyal to me." So David sent ambassadors to express sympathy to Hanun about his father's death.
But when David's ambassadors arrived in the land of Ammon,
the Ammonite commanders said to Hanun, their master, "Do you really think these men are coming here to honor your father? No! David has sent them to spy out the city so they can come in and conquer it!"
So Hanun seized David's ambassadors and shaved off half of each man's beard, cut off their robes at the buttocks, and sent them back to David in shame.
When David heard what had happened, he sent messengers to tell the men, "Stay at Jericho until your beards grow out, and then come back." For they felt deep shame because of their appearance.
When the people of Ammon realized how seriously they had angered David, they sent and hired 20,000 Aramean foot soldiers from the lands of Beth-rehob and Zobah, 1,000 from the king of Maacah, and 12,000 from the land of Tob.
When David heard about this, he sent Joab and all his warriors to fight them.
The Ammonite troops came out and drew up their battle lines at the entrance of the city gate, while the Arameans from Zobah and Rehob and the men from Tob and Maacah positioned themselves to fight in the open fields.
When Joab saw that he would have to fight on both the front and the rear, he chose some of Israel's elite troops and placed them under his personal command to fight the Arameans in the fields.
He left the rest of the army under the command of his brother Abishai, who was to attack the Ammonites.
"If the Arameans are too strong for me, then come over and help me," Joab told his brother. "And if the Ammonites are too strong for you, I will come and help you.
"Be courageous! Let us fight bravely for our people and the cities of our God. May the LORD's will be done."
When Joab and his troops attacked, the Arameans began to run away.
And when the Ammonites saw the Arameans running, they ran from Abishai and retreated into the city. After the battle was over, Joab returned to Jerusalem.
The Arameans now realized that they were no match for Israel. So when they regrouped,
they were joined by additional Aramean troops summoned by Hadadezer from the other side of the Euphrates River. 
These troops arrived at Helam under the command of Shobach, the commander of Hadadezer's forces.
When David heard what was happening, he mobilized all Israel, crossed the Jordan River, and led the army to Helam. The Arameans positioned themselves in battle formation and fought against David.
But again the Arameans fled from the Israelites. This time David's forces killed 700 charioteers and 40,000 foot soldiers, 
including Shobach, the commander of their army.
When all the kings allied with Hadadezer saw that they had been defeated by Israel, they surrendered to Israel and became their subjects. After that, the Arameans were afraid to help the Ammonites.