So David said, “I will show lovingkindness to Hanun the son of Nahash, because his father showed lovingkindness to me.” So David sent messengers to comfort him concerning his father. And David’s servants came into the land of the sons of Ammon to Hanun to comfort him.
But the princes of the sons of Ammon said to Hanun, “In your eyes, is David honoring your father because he has sent comforters to you? Have not his servants come to you to search and to overthrow and to spy out the land?”
Then certain persons went and told David about the men. And he sent to meet them, for the men were greatly dishonored. And the king said, “Stay at Jericho until your beards grow, and then return.”
Then the sons of Ammon saw that they had made themselves odious to David. So Hanun and the sons of Ammon sent 1,000 talents of silver to hire for themselves chariots and horsemen from Mesopotamia, from Aram-maacah, and from Zobah.
So they hired for themselves 32,000 chariots, and the king of Maacah and his people, who came and camped before Medeba. And the sons of Ammon gathered together from their cities and came to battle.
And the sons of Ammon came out and arranged themselves for battle at the entrance of the city. But the kings who had come were by themselves in the field.
Then Joab saw that the battle was set against him in front and in the rear. So he chose from all the choice men of Israel and they arranged themselves to meet the Arameans.
Now the sons of Ammon saw that the Arameans fled. So they themselves also fled before Abshai his brother and came into the city. Then Joab came to Jerusalem.
Then the Arameans saw that they had been defeated by Israel. So they sent messengers and brought out the Arameans who were beyond the River, and Shophach the commander of the army of Hadadezer led them.
And it was told to David, so he gathered all Israel together and crossed the Jordan, and came upon them and arranged for battle against them. So David arranged them in battle to meet the Arameans. And they fought against him.
But the Arameans fled before Israel, and David killed of the Arameans 7,000 charioteers and 40,000 foot soldiers, and put to death Shophach the commander of the army.
Then the servants of Hadadezer saw that they were defeated by Israel. So they made peace with David and served him. And the Arameans were not willing to save the sons of Ammon anymore.