Afrighids

The Afrighids (r. 305–995 CE; ) were a native Khwarezmian Iranian dynasty who ruled over the ancient kingdom of Khwarezm Over time, they were under the suzerainty of the Sassanid Empire, the Hephthalite Empire, the Göktürk Khaganate, the Umayyad Caliphate, Abbasid Caliphate and the Samanid Empire.
Sources.
Al-Biruni, the native Khwarezmian scholar, mentions twenty-two members of the Afrighid dynasty for a total span of 690 years with an average rule of 31 years for each ruler. According to him, the Afrighids ruled from 305 CE, through the Arab conquests under Qotayba b. Moslem in 93/712, and up to their overthrow in 385/995 by the rising rival family of Ma'munids. The main source on the Afrighids prior to Islam is also Al-Biruni. Part of the reason for the gap in information about this dynasty is mentioned by Al-Biruni.
Al-Biruni states:
Etymology.
It has been suggested that 'Afrigh' is the Arabicized of 'Abriz' in Persian (آبریز where water flows, a reference to the geography of Khwarazm and its abundant water). However, Dr. Parviz Azkai, in his annotations on Al-Biruni's "Chronology of Ancient Nations", explains that this is a popular etymology. Azkai explains that Afrigh was originally Ap-Air-ig meaning "from the Aryan descent": "ap" or "af" is the same in 'afrashtan' (Persian: افراشتن) to raise; "air" is the root meaning Aryan as seen in Iraj, and Eran/Iran (land of Aryan); and "-ig" is the suffix of relation in Iranian languages and cognate to '-ic' in English or '-ique' in French.
Kingdom.
The ancient Iranian kingdom of Khwarazm had been ruled until 995 by the old established line of Afrighids of Kath. Khwarazm was the well irrigated and rich agricultural region of lower Oxus. Surrounded on all sides by steppe land and desert, it was geographically isolated from other areas of civilization. This isolation allowed it to maintain a separate distinctive Iranian language and culture. Khwarazm was one of the early areas of Iranian civilization, and the local Khwarezmian historian, Al-Biruni traces civilization there beyond the first millennium BC. Before the 8th century, there had only been few ineffectual Arab raids on the fringes of Khwarezm from the directions of Khorasan and Transoxania. But in 712, Qutayba ibn Muslim was able to intervene in a civil war between the Afrighid Shah and his brother Khorrazad. Two Arab invasions lead to much destruction as Al-Biruni notes. Once the Arabs withdrew from their raid, the Shahs recovered power in Khwarezm and they continued to adhere to their ancestral faith, which according to Al-Biruni was Zoroastrianism. The local shahs continued to ally with local Iranian princes, Soghdian merchants and even Turks and Chinese in order to resist the Arabs.
It thus came vaguely under Muslim suzerainty, but it was not until the end of the 8th century or the beginning of the 9th century that an Afrighid was first converted to Islam appearing with the popular convert's name of ‘Abdallah (slave of God). In the course of the 10th century, the local family of the Ma'munids who were based in Gurganj, on the left bank of the Oxus grew in economic and political importance due to trade caravans. In 995, they violently overthrew the Afrighids of Kath and themselves assumed the traditional title of the Khwarazm Shah. Briefly, the area was under Samanid suzerainty, before it passed to Mahmud of Ghazna. From then on, Turco-Mongolian invasions and long rule by Turco-Mongol dynasties supplanted the Iranian character of the region although the title of Khwarizm Shah was maintained well up to the 15th century.
Religion.
It is generally agreed that the Afrighids were Zoroastrians until the reign of Abdallah ibn Torkasbatha during the 9th century. However, their Zoroastrian beliefs differed from those in Iran and were a mix between a local form of Khwarazmian Zoroastrianism and paganism. The Khwarazmians, like their Sogdian relatives, also made rituals and sacrifices dedicated to the Iranian mythological hero Siyavash whom they appeared to worship, according to Tolstov, with regards to vegetation.
Names of rulers.
Only consonants of the pre-Islamic names are known with long vowels, since in Arabic script, the short vowels are not written and diacritic signs are used to clarify when required. After the conversion of 'Abdallah, all the names except possibly 'Eraq are Arabic and their pronunciation is known. Unfortunately, the manuscripts that have also come down have also suffered some corruption due to scribal errors, since the Khwarezmian names were incomprehensible for most non-natives. Al-Biruni himself utilizes the extra letters of Khwarezmian which were not used in Arabic writings.
More is known about the dynasty in the Islamic era after the beginning of the 8th century and their conversion to Islam.
Name of the rulers given by the native Khwarezmian speaker Al-Biruni, and modern scholars.