Divashtich was the son of a certain Yodkhsetak, who belonged to a noble Sogdian dehqan family from Samarkand, which could trace its descent back to the Sasanian king Bahram V Gur (r. 420–438).
706, Divashtich was elected as king of Panjikant, succeeding the Turkic prince Chukin Chur Bilga as the ruler of city.
712, Divashtich, including other local Sogdian rulers such as Gurak, acknowledged the authority of the Umayyad Caliphate after an invasion by the Arab general Qutayba ibn Muslim.
While Gurak tried to break from Umayyad suzerainty and request aid from the Tang dynasty, Divashtich remained loyal to the Arabs, and his relations seems to have been so great with them that he was even considered a Muslim.
[3] As late as 721, Divashtich was in correspondence with Abd al-Rahman ibn Nu'aym al-Ghamidi, the new governor of Khorasan, who flatteringly addressed him as King of Sogdia and ruler of Samarkand, possibly trying to assure or win back his loyalty.
They managed to earn the allegiance of at-Tar, the Sogdian ruler of Farghana, who promised to give them protection in case their rebellion turned into a failure.
Al-Harashi quickly marched towards Khujand, where he defeated the army of Karzanj, brutally massacring over 3,000 Sogdian inhabitants in the city.