Babylon was a significant city in ancient Mesopotamia, in the fertile plain between the Tigris and Euphrates rivers. The city was built upon the Euphrates, and divided in equal parts along its left and right banks, with steep embankments to contain the river's seasonal floods. Babylon was originally a small Semitic Akkadian city dating from the period of the Akkadian Empire c. 2300 BC. The town attained independence as part of a small city state with the rise of the First Amorite Babylonian Dynasty in 1894 BC. Claiming to be the successor of the more ancient Sumero-Akkadian city of Eridu, Babylon eclipsed Nippur as the "holy city" of Mesopotamia around the time Amorite king Hammurabi created the first short lived Babylonian Empire in the 18th century BC. Babylon grew and South Mesopotamia came to be known as Babylonia. The empire quickly dissolved after Hammurabi's death and Babylon spent long periods under Assyrian, Kassite and Elamite domination. After being destroyed and then rebuilt by the Assyrians, Babylon became the capital of the Neo-Babylonian Empire from 609 to 539 BC. The Hanging Gardens of Babylon was one of the Seven Wonders of the Ancient World. After the fall of the Neo-Babylonian Empire, the city came under the rules of the Achaemenid, Seleucid, Parthian, Roman and Sassanid empires. It has been estimated that Babylon was the largest city in the world from c. 1770 to 1670 BC, and again between c. 612 and 320 BC. It was perhaps the first city to reach a population above 200,000. Estimates for the maximum extent of its area range from 890 to 900 hectares (2,200 acres). The remains of the city are in present-day Hillah, Babil Governorate, Iraq, about 85 kilometres (53 mi) south of Baghdad, comprising a large tell of broken mud-brick buildings and debris.
The First Babylonian Dynasty was established by an Amorite chieftain named Sumu-abum in 1894 BC, who declared independence from the neighbouring city-state of Kazallu. The Amorites were not native to Mesopotamia, but were semi nomadic Canaanite Northwest Semitic invaders from the northern Levant. They (together with the Elamites to the east) had originally been prevented from taking control of the Akkadian states of southern Mesopotamia by the intervention of powerful Assyrian kings of the Old Assyrian Empire during the 21st and 20th centuries BC, intervening from northern Mesopotamia. However, when the Assyrians turned their attention to expanding their colonies in Asia Minor, the Amorites eventually began to supplant native rulers across the region. Babylon was initially a minor city state, and controlled little surrounding territory, and its first four Amorite rulers did not even assume the title of king of the city. It remained overshadowed by older and more powerful states such as Assyria, Elam, Isin and Larsa until it became the capital of Hammurabi's short lived Babylonian Empire about a century later. Hammurabi (r. 1792–1750 BC) is famous for codifying the laws of Babylonia into the Code of Hammurabi. He conquered all of the cities and city states of southern Mesopotamia, including Isin, Larsa, Ur, Uruk, Nippur, Lagash, Eridu, Kish, Adab, Eshnunna, Akshak, Akkad, Shuruppak, Bad-tibira, Sippar and Girsu, coalescing them into one kingdom, ruled from Babylon. Hammurabi also invaded and conquered Elam to the east, and the kingdoms of Mari and Ebla to the north west. After a protracted struggle with the powerful Mesopotamian king Ishme-Dagan of Assyria, he forced his successor to pay tribute late in his reign, spreading Babylonian power to Assyria's Hattian and Hurrian colonies in Asia Minor. After the reign of Hammurabi, the whole of southern Mesopotamia came to be known as Babylonia, whereas the north had coalesced centuries before into Assyria. From this time, Babylon also became the major religious center of Mesopotamia, supplanting the more ancient cities of Nippur and Eridu. Hammurabi's empire destabilized after his death. Assyrians defeated and drove out the Babylonians and Amorites. The far south of Mesopotamia broke away, forming the Sealand Dynasty, and the Elamites appropriated territory in eastern Mesopotamia. The Amorite dynasty remained in power in Babylon, which again became a small city state. In 1595 BC the city was overthrown by the Hittite Empire from Asia Minor. Thereafter, Kassites from the Zagros Mountains of north western Ancient Iran captured Babylon, ushering in a dynasty that lasted for 435 years, until 1160 BC. The city was renamed Karanduniash during this period. Kassite Babylon eventually became subject to the Middle Assyrian Empire (1365–1053 BC) to the north, and Elam to the east, with both powers vying for control of the city. The Assyrian king Tukulti-Ninurta I took the throne of Babylon in 1235 BC. By 1155 BC, after continued attacks and annexing of territory by the Assyrians and Elamites, the Kassites were deposed in Babylon. An Akkadian south Mesopotamian dynasty then ruled for the first time. However, Babylon remained weak and subject to domination by Assyria. Its ineffectual native kings were unable to prevent new waves of foreign West Semitic settlers from the deserts of the Levant, including the Arameans and Suteans in the 11th century BC, and finally the Chaldeans in the 9th century BC, entering and appropriating areas of Babylonia for themselves. The Arameans briefly ruled in Babylon during the late 11th century BC.
Assyrian Period Sennacherib of Assyria during his Babylonian war, relief from his palace in Nineveh During the rule of the Neo-Assyrian Empire (911–609 BC), Babylonia was under constant Assyrian domination or direct control. During the reign of Sennacherib of Assyria, Babylonia was in a constant state of revolt, led by a Chaldean chieftain named Merodach-Baladan, in alliance with the Elamites, and suppressed only by the complete destruction of the city of Babylon. In 689 BC, its walls, temples and palaces were razed, and the rubble was thrown into the Arakhtu, the sea bordering the earlier Babylon on the south. Destruction of the religious center shocked many, and the subsequent murder of Sennacherib by two of his own sons while praying to the god Nisroch was considered an act of atonement. Consequently, his successor Esarhaddon hastened to rebuild the old city and make it his residence during part of the year. After his death, Babylonia was governed by his elder son, the Assyrian prince Shamash-shum-ukin, who eventually started a civil war in 652 BC against his own brother, Ashurbanipal, who ruled in Nineveh. Shamash-shum-ukin enlisted the help of other peoples subject to Assyria, including Elam, Persia, Chaldeans and Suteans of southern Mesopotamia, and the Canaanites and Arabs dwelling in the deserts south of Mesopotamia. Once again, Babylon was besieged by the Assyrians, starved into surrender and its allies were defeated. Ashurbanipal celebrated a "service of reconciliation", but did not venture to "take the hands" of Bel. An Assyrian governor named Kandalanu was appointed as ruler of the city. After the death of Ashurbanipal, the Assyrian empire destabilized due to a series of internal civil wars throughout the reigns of Assyrian kings Ashur-etil-ilani, Sin-shumu-lishir and Sin-shar-ishkun. Eventually Babylon, like many other parts of the near east, took advantage of the anarchy within Assyria to free itself from Assyrian rule. In the subsequent overthrow of the Assyrian Empire by an alliance of peoples, the Babylonians saw another example of divine vengeance.
Neo-Babylonian Chaldean Empire Under Nabopolassar, a previously unknown Chaldean chieftain, Babylon eventually escaped Assyrian rule, and in an alliance with Cyaxares, king of the Medes and Persians together with the Scythians and Cimmerians, the Assyrian Empire was finally destroyed between 612 BC and 605 BC. Babylon thus became the capital of the Neo-Babylonian (sometimes and possibly erroneously called Chaldean) Empire. With the recovery of Babylonian independence, a new era of architectural activity ensued, particularly during the reign of his son Nebuchadnezzar II (604–561 BC). Nebuchadnezzar ordered the complete reconstruction of the imperial grounds, including the Etemenanki ziggurat, and the construction of the Ishtar Gate—the most prominent of eight gates around Babylon. A reconstruction of the Ishtar Gate is located in the Pergamon Museum in Berlin. Nebuchadnezzar is also credited with the construction of the Hanging Gardens of Babylon—one of the seven wonders of the ancient world—which is said to have been built for his homesick wife Amyitis. Whether the gardens actually existed is a matter of dispute. Excavations by German archaeologist Robert Koldewey are thought to reveal its foundations, though many historians disagree about the location, and some believe it may have been confused with gardens in the Assyrian capital, Nineveh. Chaldean rule of Babylon did not last long; it is not clear whether Neriglissar and Labashi-Marduk were Chaldeans or native Babylonians, and the last ruler Nabonidus (556–539 BC) and his co-regent son Belshazzar were Assyrians from Harran.