When the Ammonites realized that the Arameans were fleeing, they too fled before his brother Abishai and went inside the city. So Joab went back to Jerusalem.
NIV
And when the Ammonites saw that the Syrians fled, they likewise fled before Abishai, Joab's brother, and entered into the city [Medeba]. Then Joab came to Jerusalem.
AMP
And when the children of Ammon saw that the Syrians were fled, they likewise fled before Abishai his brother, and entered into the city. Then Joab came to Jerusalem.
KJV
The Ammonites came out and drew up in battle formation at the entrance to their city, while the kings who had come were by themselves in the open country.
NIV
And the Ammonites came out and lined up in battle array before the entrance of the city [Medeba], and the kings who had come were by themselves in the open country.
AMP
And the children of Ammon came out, and put the battle in array before the gate of the city: and the kings that were come were by themselves in the field.
KJV