So Joab fought against Rabbah of the Ammonites and captured the royal city.