massacred all the Sogdians in Fanyang, who were identified through their noses and faces. The political decline was paralleled by economic decline, including large Tang governmental debt to Uighur money lenders. The old taxation system of Zu Yong Diao no longer functioned after the rebellion. In addition to being politically and economically detrimental to the empire, the rebellion also affected the intellectual culture of the Tang dynasty. Many intellectuals had their careers interrupted, giving them time to ponder the causes of the unrest. Some lost faith in themselves, concluding that a lack of moral seriousness in intellectual culture had been the cause of the rebellion. However, a political and cultural recovery eventually did occur within Tang China several decades after the rebellion, until about 820, the year of the death of Emperor Xianzong of Tang. Much of the rebuilding and recovery occurred in the Jiangnan region in the south, which had escaped the events of the rebellion relatively unscathed and remained more firmly under Tang control. However, due in part to the jiedushi system, the Tang Empire by 907 devolved into what is known as the Five Dynasties and Ten Kingdoms period. The Tang dynasty recovered its power decades after the An Lushan rebellion and was still able to launch offensive conquests and campaigns like its destruction of the Uyghur Khaganate in Mongolia in 840-847. The Yenisei Kyrgyz Khaganate of the Are family bolstered his ties and alliance to the Tang dynasty Imperial family against the Uyghur Khaganate by claiming descent from the Han dynasty Han Chinese general Li Ling who had defected to the Xiongnu and married a Xiongnu princess, daughter of Qiedihou Chanyu and was sent to govern the Jiankun (Ch'ien-K'un) region which later became Yenisei. Li Ling was a grandson of Li Guang (Li Kuang) of the Longxi Li family descended from Laozi which the Tang dynasty Li Imperial family claimed descent from. The Yenisei Kyrgyz and Tang dynasty launched a victorious successful war between 840-848 to destroy the Uyghur Khaganate in Mongolia and its centre at the Orkhon valley using their claimed familial ties as justification for an alliance. Tang dynasty Chinese forces under General Shi Xiong wounded the Uyghur Khagan (Qaghan) Ögä, seized livestock, took 5,000-20,000 Uyghur Khaganate soldiers captive, killed 10,0000 Uyghur Khaganate sources on 13 February 843 at the battle of Shahu (kill the barbarians) mountain in 843. It was the Huang Chao