
The kings before Hammurabi had begun to finally consolidate a rule over the internally feuding area of Babylonia. The area that Hammurabi inherited as king was not exactly large; before any of the preceding kings had really established themselves, Babylon was merely just another city-state in Mesopotamia. Eventually, the rulers before Hammurabi acquired some minor lands, such as Borsippa, Kish, and Sippar which were also previously their own small city-states. The first few decades of Hammurabi’s reign were relatively peaceful. Hammurabi expanded the temples in Babylon, and heightened the walls for defensive purposes, during this lull. In 1766 BC the powerful kingdom of Elam invaded the Mesopotamian plain. Because Elam had power amongst the plain states, Elam managed to turn the city of Eshnunna to ruin, destroying many cities in its wake, and forcing its rule on parts of the plain for the first time.
In order to make its position stable and secure, Elam tried to start a war between Hammurabi’s Babylonian kingdom and the kingdom of Larsa. The king of Larsa, and Hammurabi allied when they found out they were being turned against one another by Elam. They were able to stamp out the Elamites, however, Larsa held back in their contribution to the military effort. Whether or not it was because Larsa’s kingdom was actually able to give the aid Hammurabi required is unknown, though Larsa’s kingdom was significantly smaller than Hammurabi’s steadily expanding empire. Because Larsa failed to give adequate aid, Hammurabi took over that souther power, and gained control of the entire lower Mesopotamian plain.