Shamshi-Adad was the fourth king of Babylon. Shamshi-Adad was a general of Amorite descent, and the son of a Euphrates prince. He overthrew the Assyrian Dynasty, annexed the region called Mari, and subsequently controlled from the Mediterranean to Babylon. It was during his reign that Hammurabi became king in Babylon. At first, Hammurabi followed his predecessors footsteps. He spent his time building of canals, irrigation systems, and working in agriculture in general. At this time, and for at least the next decade, Hammurabi was just a minor figure in the region, and then suddenly Shamshi-Adad died and Hammurabi became the sole ruler.
It didn't take long before Hammurabi became a skilled diplomat. He maintained relationships with almost all of his adversaries. His largest group of adversaries were from Larsa, Mari, and Eshnunna. Each of the kings from these countries maintained ambassadors in the other countries, and in times of crisis they would loan each other thousands of troops. Once during an emergency Hammurabi received troops from as far away as northern Syria. It didn't take long before Hammurabi became a skilled diplomat. He maintained relationships with almost all of his adversaries. His largest group of adversaries were from Larsa, Mari, and Eshnunna. Each of the kings from these countries maintained ambassadors in the other countries, and in times of crisis they would loan each other thousands of troops.
After three decades of rule, Hammurabi controlled the strongest army in Mesopotamia. However, he wanted to expand his empire even further. He started by defeating his main rival Rim-Sin of Larsa. It wasn't long before he controlled all of Babylonia. Then in his 32nd year, he defeated the kingdoms of Eshnunna, Subartum, Mari, Gutians, and overran the Amorite positions. Finally, in his 38th year of rule he defeated his last adversary Nineveh. At this time, Hammurabi ruled all of Mesopotamia.
In 1901, French archaeologist were digging in Susa in southwest Persia when they came across a large inscribed black stone monument. It would take another month of digging before they would be able to assemble the entire 5 foot tall stela. The stela was inscribed in cuneiform columns and showed a king before a seated god. Once deciphered archaeologists realized that the text was a series of laws that had come directly from Hammurabi. On the stela were decisions that the king himself had made in different cases. The laws were broadly arranged according to subject.
Hammurabi's laws are widely considered to be the most important collection of ancient laws that originated in the ancient Near East. His laws covered women getting married, adultery, bigamy, inheritance, and divorce. They made no distinction between criminal and civil law, and by modern standards they were fairly harsh. Numerous crimes resulted in the death sentence including sorcery, theft, receiving stolen property, kidnapping, helping a slave, arson, and robbery. He killed the offender's daughter, cut off a hand, ear, tongue, breast, or even blinded the offender. They didn't put people in jail, instead they issued corporal punishment. Criminals could also be exiled, whipped, or forced into slavery.
One of the achievements that is not widely associated with Hammurabi was the development of mathematics during his reign. His people were among the first to understand the mathematical concept of zero. In the city of Nippur, scholars excelled in Algebra and Geometry. They understood reciprocals, square roots, as well as cube roots.