During the reigns of Emperor Xuanzong of the Tang and Emperor Dezong, most of the prefectures and counties in the Western Regions were occupied by the Tibetan Empire. Many Han Chinese, Uyghurs, Turks, and other peoples of the Tang were cut off from Tang rule and forced to endure Tibetan oppression, exploitation, and slaughter. In response, heroes and righteous fighters of the martial world rose up in resistance. In the end, they reclaimed most of the lost territories in the Western Regions and brought them back into the embrace of the Tang.