Tibetan Empire
Khotan was conquered by the Tibetan Empire in 792 and gained its independence in 851.