The earliest historical reference to the region dates to the Ur III dynasty, when king Shulgi mentioned the city of Urbilum – the ancient name of modern-day Erbil. The great Assyrian capitals of Assur, Nineveh, Nimrud and Dur-Sharrukin were all located in the foothill zone where the Great Zab flows into the Tigris, and the Great Zab basin became increasingly integrated into the Middle Assyrian and Neo-Assyrian empires. Nimrud, the capital of the empire until 706 BCE, was located only away from the confluence of the Great Zab with the Tigris. The Assyrian king Ashurnasirpal II constructed a canal called "Patti-Hegalli" that tapped water from the Great Zab to irrigate the land around Nimrud, and this canal was restored by his successors Tiglath-Pileser III and Esarhaddon. This canal ran along the right bank of the Great Zab and cut through a rock bluff by means of a tunnel and is still visible today. After the fall of the Neo-Assyrian empire, the Medes gained control of the area, followed by the Achaemenids in 550 BCE. The Battle of Gaugamela in 331 BCE – one of the decisive battles leading to the fall of the Achaemenid empire at the hands of Alexander the Great – supposedly took place north of the Great Zab in the vicinity of Mosul. After Alexander’s death in 323 BCE, control of the area shifted to the Seleucids.