26Meanwhile, Joab fought against Rabbah of the Ammonites and captured the royal fortress.
27Then Joab sent messengers to David to say, “I have fought against Rabbah and have captured the water supply of the city.
28Now, therefore, assemble the rest of the troops, lay siege to the city, and capture it. Otherwise I will capture the city, and it will be named after me.”
29So David assembled all the troops and went to Rabbah; and he fought against it and captured it.
30Then he took the crown from the head of their king. It weighed a talent of gold and was set with precious stones, and it was placed on David’s head. And David took a great amount of plunder from the city.
31David brought out the people who were there and put them to work with saws, iron picks, and axes, and he made them work at the brick kilns. He did the same to all the Ammonite cities. Then David and all his troops returned to Jerusalem.
— 2 Samuel 12:26-31