On hearing this, David sent Joab and the entire army of mighty men.
David had said, “Whoever strikes down the Jebusites first will be commander-in-chief.” So Joab son of Zeruiah went up first, so he became commander.
So they hired 32,000 chariots along with the king of Maacah and his people, who came and camped before Medeba. The children of Ammon also assembled from their cities and moved out to the battle.
The children of Ammon came out and took up battle formation at the city gate, while the kings who had come were by themselves in the field.