2 Samuel 12:26-29 NIV

26 Meanwhile Joab fought against Rabbah1 of the Ammonites and captured the royal citadel.

References for 2 Samuel 12:26

27 Joab then sent messengers to David, saying, "I have fought against Rabbah and taken its water supply.
28 Now muster the rest of the troops and besiege the city and capture it. Otherwise I will take the city, and it will be named after me."
29 So David mustered the entire army and went to Rabbah, and attacked and captured it.