The Iranian origins of the Azeris likely derive from ancient Iranic tribes, such as the Medes in Iranian Azerbaijan, and Scythian invaders who arrived during the eighth century BCE. It is believed that the Medes mixed with an indigenous population, the Caucasian Mannai, a Northeast Caucasian group related to the Urartians.[18] Ancient written accounts, such as one written by Arab historian Abu al-Hasan Ali ibn al-Husayn al-Masudi (896956), attest to an Iranian presence in the region:
The Persians are a people whose borders are the Mahat Mountains and Azerbaijan up to Armenia and Aran, and Bayleqan and Darband, and Ray and Tabaristan and Masqat and Shabaran and Jorjan and Abarshahr, and that is Nishabur, and Herat and Marv and other places in land of Khorasan, and Sejistan and Kerman and Fars and Ahvaz...All these lands were once one kingdom with one sovereign and one language...although the language differed slightly. The language, however, is one, in that its letters are written the same way and used the same way in composition. There are, then, different languages such as Pahlavi, Dari, Azeri, as well as other Persian languages.