Kingdom of Qocho
Zhang Yichao rebelled against Tibetan rule in Sha Prefecture (Dunhuang) in 848. In 850 he recaptured Yi Prefecture, in 851 Xi Prefecture, and in 866 Ting Prefecture. However he immediately lost Ting and Xi prefectures as well as Luntai (Ürümqi) to the Kingdom of Qocho. In 876 Yi Prefecture was also captured by the Kingdom of Qocho.