Medo-Babylonian war against Assyrian Empire

When Assurbanipal died in 627 BCE, his son Assur-etil-ilâni became briefly king before being killed during a revolt, probably launched by his brother, Sin-shar-ishkun. The latter then became king of the Assyrian Empire, but Babylonia's governor, Nabopolassar proclaimed himself king of Babylonia. From 626/625 BCE, Sin-shar-ishkun engaged in a war to make Babylonia come back under his rule.

The war
The Assyrians quickly conquered Uruk but lost it again. The Babylonians defeated the Assyrians at the battle of Nippur and aftermath, are victorious in 616 BC and 615 BC (battle of Arakpa) but are defeated at Assur. The situation changed when the Medes, under the command of Cyaxares, invaded the Assyrian Empire, beating them in 615 BC at the battle of Arapha, in 614 BC at Tarbisu and then at Assur (which was looted) but the Babylonians were defeated at Anat. Medes and Babylonians joined their forces to besiege Nineveh, and in July 612 BC, after 3 months of battle the city was taken by the allied forces. Sin-shar-ishkun was killed during the battle. Ashur-uballit II, the new king of Assyria, took Harran as capital and tried to repel the invaders with the help of Egypt, but he was finally defeated and killed in 609 BC during the Fall of Harran. Assyria then ceased to exist as an independent state.