According to his own testimony, Hammurabi (Hammurapi) was destined for kingship since time immemorial, when two powerful gods, Anu and Enlil, entrusted to a third god, Marduk, control over destiny, on Earth as in heaven. At that time, too, the gods set Babylon above all other lands, and its rule was made everlasting. Here is how Hammurabi describes himself on an inscribed black basalt stele we have come to call the Code of Hammurabi:
At that time, to give happiness to the people, Anum and Enlil pronounced my name “Hammurabi,” me, the pious and god- fearing ruler, to decree equity in the land, to eradicate the wicked and the evil so that the powerful might not oppress the powerless, to rise like Shamash and illumine the land for the black-headed (people).
Civilizations of the Ancient Near East, edited by J.M. Sasson (New York, 1995)