Babylonia was a state in southern Mesopotamia, in what is today Iraq, combining the territories of Sumer and Akkad. The earliest mention of the city of Babylon can be found in a tablet from the reign of Sargon of Akkad, dating back to the 23rd century BC.
At around 2000 BC, a semitic people known as Amorites from west of the Euphrates River gained control over most of Mesopotamia, where they formed a series of small kingdoms. One of these Amorite dynasties was established in the city-state of Babylon, which would ultimately take over the others and form the first Babylonian empire, during what is also called the Old Babylonian Period.
The city of Babylon obtained hegemony over Mesopotamia under their sixth ruler, Hammurabi (c. 1780– c. 1750 BC; dates highly uncertain). He was a very efficient ruler, writing an influential law code, called Hammurabi’s Code, and giving the region stability after turbulent times, thereby transforming it into the central power of Mesopotamia.
Babylonian beliefs held the king as an agent of Marduk, patron deity of the city of Babylon, and the city of Babylon as a "holy city" where any legitimate ruler of Mesopotamia had to be crowned. A natural development was the establishment of a bureaucracy, with taxation and centralized government, to allow the king to exert his control.