The Medes were a people of Indo-European origin who migrated into Iran toward the end of the second millennium B.C. By the eighth century, they had consolidated themselves into a kingdom, known as Media, with the capital Ecbatana (modern Hamadan). They became instrumental in the downfall of the NeoAssyrian empire in the late seventh century when they joined Babylon in an anti-Assyrian alliance that resulted in the sack of Nineveh in 612 B.C. They were to take most of the former Assyrian provinces and dependencies in eastern Anatolia and northwest Iran. The Medes were in turn overrun by other Persian groups led by the Achaemenid king Cyrus II around 550 B.C. Although they lost their independence, the Median elite continued to exercise much influence at the new court.
Historical Dictionary of Mesopotamia. EdwART. 2012.