Updated: Jun 19
The kings who came before Hammurabi had ruled a relatively minor city-state that was created in about 1854 B.C. Their kingdom controlled little territory outside the city itself. These kings managed to gradually create a state incorporating previously independent northern cities such as Sippar, Kish, Dilbat, and Marad. Babylonia was hemmed in by the more prominent states of Eshnunna, Larsa, and the Kingdom of Upper Mesopotamia. When Hammurabi became king in 1792 B.C., Rim-Sin had just unified the entirety of southern Babylonia while Shamshi-Adad reigned supreme in the north. Hammurabi may at first have even owed allegiance to Shamshi-Adad. But, Hammurabi would usher in the “Old Babylonian Period”, the beginning of Babylon's political dominance over southern Mesopotamia for the next 1500 years.
The first few decades of Hammurabi's reign were quite peaceful. He used his power to dig canals, expand temples, and fortify cities. When he decided to act militarily, his actions would be short but devastating; while using his considerable diplomatic skills.
In 1801 B.C., the powerful kingdom of Elam attacked and destroyed the kingdom of Eshnunna, destroying a number of cities and imposing its rule on portions of the fertile plain for the first time. In order to consolidate its position, Elam tried to start a war between Babylon and Larsa. Hammurabi and Rim-Sin discovered this manipulation and made an alliance with each other to attack Elam. They were able to successfully crush the Elamites, although Larsa did not contribute greatly to the military effort. Angered by Rim-Sin's failure to come to his aid, Hammurabi turned on his ally and gained control of the Lower Mesopotamian plain.
As Hammurabi was assisted during the war in the south by his allies from the north such as Yamhad and Mari, the absence of soldiers in the north led to unrest. As a result, he turned to the north and defeated Eshnunna and Mari in quick succession. Eshnunna he left without a leader, while he blocked Elam's ability to exercise any influence over Mesopotamia, where he campaigned twice in later years without fully controlling the region. There is no doubt, however, that he was the strongest king in Mesopotamia. After these events, he could proclaim himself “The king who made the four quarters of the Earth obedient”.