Nahash was king of Ammon. After he died, his son became the next king after him.
David thought, "I'm going to be kind to Hanun. His father Nahash was kind to me." So David sent messengers to Hanun. He wanted them to tell Hanun how sad he was that Hanun's father had died. David's messengers went to the land of Ammon. They told Hanun how sad David was.
The Ammonite nobles spoke to Hanun. They said, "David has sent messengers to tell you he is sad. They say he wants to honor your father. But the real reason they've come is to look the land over. They want to destroy it."
So Hanun grabbed hold of David's men. He shaved them. He cut their clothes off just below the waist and left them half naked. Then he sent them away.
Someone came and told David what had happened to his men. So David sent messengers to them because they were filled with shame. King David said to them, "Stay at Jericho until your beards grow out again. Then come back here."
The Ammonites realized that what they had done had made David very angry with them. So Hanun and the Ammonites got 37 tons of silver. They used it to hire chariots and chariot riders from Aram Naharaim, Aram Maacah and Zobah.
They hired 32,000 chariots and riders. They also hired the king of Maacah and his troops. All of them came out and camped near Medeba. At the same time the Ammonites brought their troops together from their towns. Then they marched out to fight.
David heard about it. So he sent Joab out with the entire army of Israel's fighting men.
The Ammonites marched out. They took up their battle positions at the entrance to their city. The kings who came to help them gathered their troops together in the open country.
Joab saw that there were lines of soldiers in front of him and behind him. So he chose some of the best troops in Israel. He sent them to march out against the Arameans.
He put the rest of the men under the command of his brother Abishai. They were sent to march out against the Ammonites.
Joab said, "Suppose the Arameans are too strong for me. Then you must come and help me. But suppose the Ammonites are too strong for you. Then I'll come and help you.
Be strong. Let's be brave as we fight for our people and the cities of our God. The LORD will do what he thinks is best."
Then Joab and the troops who were with him marched out to attack the Arameans. They ran away from him.
The Ammonites saw that the Arameans were running away. So they also ran away from Joab's brother Abishai. They went inside the city. Then Joab went back to Jerusalem.
The Arameans saw that they had been driven away by Israel. So they sent messengers to get some Arameans from east of the Euphrates River. The Arameans were under the command of Shophach. He was the commander of Hadadezer's army.
David was told about it. So he gathered the whole army of Israel together. They went across the Jordan River. David marched out against the Arameans. He lined up his soldiers opposite them. He lined them up to meet the Arameans in battle. The Arameans began to fight against him.
But then they ran away from Israel. David killed 7,000 of their chariot riders. He killed 40,000 of their soldiers who were on foot. He also killed Shophach, the commander of their army.
The people who were under the rule of Hadadezer saw that Israel had won the battle over them. So they made a peace treaty with David. They were brought under his rule. After that, the Arameans wouldn't help the Ammonites anymore.