Ustrushana had close historical, cultural, ethnic and linguistic ties to
Sogdia. It originally formed part of the territory of Sogdia, but then developed its own identity as the area became more urbanized. From the fifth to the seventh century CE, Ushrusana was part of the territory of the
Hephthalites, followed by the
Western Turkic Khaganate after 560 CE. The Principality probably retained a certain level of autonomy throughout this period and was ruled directly by the afshins. The first invasion by the Muslims did not result in them controlling the area. However, during the reign of the caliph
al-Mahdi (775-85) the Afshin of Oshrusana is mentioned among several Iranian and
Turkic rulers of Transoxania and the Central Asian steppes who submitted nominally to him. But it was not until
Harun al-Rashid's reign in 794-95 that
al-Fadl ibn Yahya of the
Barmakids led an expedition into Transoxania and received the submission of the ruling afshin, Karākana, who had never previously humbled himself before any other potentate. Further expeditions were sent to Ushrusana by al-Ma'mūn when he was governor in
Merv and after he had become caliph. The afshin Kavus, son of the afshin Karākana who had submitted to al-Fadl ibn Yahya, withdrew his allegiance from the Muslims; but shortly after Ma'mun arrived in
Baghdad from the East (817-18 or 819-20), a power struggle and dissensions broke out among the ruling family. Kawus' son afshin Khaydar became a general in the Abbasid army and fought against the
Khurramites and their leader,
Babak Khorramdin, in
Azerbaijan (816-837). In 841, Khaydar was arrested in
Samarra on suspicion of plotting against the Abbasids. A single location was used for the crucifixion of Khaydar, Maziyar, and Babak's corpses. After his death, Ustrushana was
Islamified; Khaydar had preserved temples from ruin. There are indications that semi-autonomous Afshins continued to rule over the Ustrushana after control of the region was wrested from the Abbasids by the
Saffarids and, soon after, the
Samanid Empire. ==See also==