Protector Of The Realm
During his long reign as emperor, Hammurabi not only expanded and maintained the empire but also defended it by collaborating with or attacking neighboring states. Hammurabi built canals throughout the city of Babylon as they offered an additional line of defense to stave off enemy attack. In order to defend the city from intruders, he also raised its walls. He was able to keep the city peaceful throughout his rule in this fashion. According to Stephen Bertman in the Handbook to Life in Ancient Mesopotamia, Hammurabi was strong enough to start conquering wars after spending several decades constructing Babylon. He attacked Eschunna in the east, Assyria in the north, Larsa in the south, and Mari in the west all in fast succession.
According to the Ancient History Encyclopedia, Hammurabi was skilled at using both force and diplomacy. He would create alliances with other kings and then sever them whenever it was practical. He also used cunning tactics to fight. One of his methods involved blocking the water supply to a rival city. Then he would either suddenly unleash the waters and cause a devastating flood to soften his target for his attack or he would use thirst to pressure its leaders into surrender.