Second Dynasty (720-893 CE) Ushrusana is mentioned by Arab sources during the Muslim conquest of Transoxiana, and was at times nominally subject to the Caliphate, but it remained effectively independent. The Principality probably retained a certain level of autonomy throughout this period, and was ruled directly by the afshins of the Kavus dynasty. A Second dynasty is known from this period, which ruled between 720 and 894 CE, until the Principality was overtaken by the Samanid Empire: Kharabugra (720-738), Hanahara (738-800), Cavus (800-825), Haydar (al-Afshin) (825-840), Hassan (840-860), Abdallah (860-880), Sayr (880-893/894). Several Umayyad governors conducted raids into the country and received tribute from its rulers, but permanent conquest was not achieved by them. After the Abbasids came to power in 750, the princes of Ushrusana made submissions to the caliphs during the reigns of al-Mahdi (r. 775–785) and Harun al-Rashid (r. 786–809), but these appear to have been nominal acts and the people of the region continued to resist Muslim rule. The Muslim historian Ya'qubi (died 897/8) in his Ta'rikh ("History"), recounts that the third Abbasid Caliph Al-Mahdi (ruled 775-785 CE) asked for, and apparently obtained, the submission of various Central Asian rulers, including that of the Afshīn of Usrushana. The original account by Ya'qubi reads: Ushrusana was more firmly brought under Abbasid control following a quarrel that broke out within the ruling dynasty, during the caliphate of al-Ma'mun (r. 813–833). In 822, a Muslim army under Ahmad ibn Abi Khalid al-Ahwal conquered Ushrusana and captured its ruler Kawus ibn Kharakhuruh; he was sent to Baghdad, where he submitted to the caliph and converted to Islam. From this point on, Ushrusana was generally considered to be part of the Abbasid state, although the afshins were allowed to retain their control over the country as subjects of the caliph. Kawus was succeeded by his son Khaydar, who had assisted Ahmad ibn Abi Khalid in his campaign against Ushrusana. Khaydar, who is usually referred to in the sources simply as al-Afshin, decided to enter the service of the Abbasids and made his way to al-Ma'mun's court. There he embarked on a military career, and became a commander in the caliphal army. With Afshin came a number of his followers, a number of whom were fellow natives of Ushrusana. These men were integrated into the army and, serving under their prince, became known as the Ushrusaniyya. However, Afshin later tried to gain