When the Ammonites realized that they had become obnoxious to David, they hired twenty thousand Aramean foot soldiers from Beth Rehob and Zobah, as well as the king of Maakah 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 of their city gate, while the Arameans of Zobah and Rehob and the men of Tob and Maakah 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 realized 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.