Meanwhile, Joab attacked the Ammonite city of Rabbah and captured its stronghold. 