At the end of the 2nd millennium BC, the Median tribes began to settle in the future Median territory in western Iran, where at that time many small princes and different linguistic and ethnic groups testify: the Goths, the Lulubians, the Kassites and the Hurrians. . Later, in the 9th to 8th centuries BC, the role of the Medes increased greatly. And finally, in the 7th century, the entire west of Iran and some neighboring areas were attributed to the Medes. Thus, the boundaries of the Medes gradually changed over several hundred years. However, its exact geographical extent remains unknown to us. In the beginning, the western borders of the Median kingdoms, which were independent from each other, did not go beyond the western areas of the Hamadan plain. But our information about the northern and eastern borders of Madh is very limited. The main territory of Media, as it was known to the Assyrians, during the period from the last third of the 9th century to the beginning of the 7th century BC, was limited from the north to Gizilbunda, which was located in this region. Mountains (Qaflankoh) in the north of Hamadan plain; In the west and northwest, it did not go beyond the Hamadan plain and was limited to the Zagros mountains, except for the southwest. There, the Medes occupied the Zagros Valley, and its border was the Garin mountain range, which separated the Medes from Ilipi, a kingdom in the Pish-Kuh region south of Kermanshah. In the south, it bordered with the Elamite region of Simashki, that is, the present-day Khorramabad Valley.