Before the Ganlu Incident In 826, Emperor Jingzong was assassinated by his
polo players, who had resented him for his impulsively harsh treatment of them. After a faction of eunuchs had tried to make his uncle
Li Wu the Prince of Jiāng emperor, another faction of eunuchs, led by Wang Shoucheng, defeated the faction supporting Li Wu and made Emperor Jingzong's younger brother
Li Han the Prince of Jiàng (note different tone) emperor (as Emperor Wenzong). Li Deyu himself was sent to Xichuan Circuit (西川, headquartered in modern
Chengdu, Sichuan), which had recently been devastated by a
Nanzhao incursion, as its military governor. It was said that Li Deyu distinguished himself there by building up the defenses, rebuilding the economy, and training the soldiers. In 831, Xidamou (悉怛謀), the
Tufan officer in charge of Wei Prefecture (維州, in modern
Ngawa Tibetan and Qiang Autonomous Prefecture, Sichuan), surrendered Wei Prefecture, which Tufan had captured from Tang decades earlier, to him. Li Deyu advocated accepting the surrender and using Wei Prefecture as a launch pad for a major campaign against Tufan. Niu opposed, arguing that this was a violation of the peace treaty between Tang and Tufan and that, should a war start, Tufan forces could reach Chang'an easily. Emperor Wenzong accepted his argument and ordered that Li Deyu return Wei Prefecture, as well as Xidamou and his soldiers, to Tufan. Tufan had Xidamou and his soldiers massacred. The massacre brought much popular sentiment against Niu, and was commonly viewed at the time to be the result of the conflict between Niu/Li Zongmin and Li Deyu. With Emperor Wenzong regretting the decision, Niu repeatedly offered to resign. Emperor Wenzong was constantly asking the chancellors when true peace would come to the realm. Niu saw true peace as impossible to achieve within a short time and viewed Emperor Wenzong as overly eager. Around the new year 833, Emperor Wenzong made Niu the military governor of Huainan Circuit (淮南, headquartered in modern
Yangzhou, Jiangsu).) Li Deyu was recalled to Chang'an to serve as the minister of defense (兵部尚書,
Bingbu Shangshu), and it was commonly expected that he would next become chancellor, despite Li Zongmin's opposition. Li Zongmin's associate
Du Cong suggested an attempt to make peace with Li Deyu—as Du felt that Li Deyu's resentment toward the Niu Faction officials partially stemmed from his jealousy of their having passed the imperial examinations, whereas he was perceived as having risen due to his family background. Du suggested that Li Zongmin recommend Li Deyu to be in charge of the imperial examinations to satisfy him. Li Zongmin rejected this idea, but initially accepted Du's alternative idea of recommending Li Deyu to be chief imperial censor. When Li Zongmin sent Du to visit Li Deyu to communicate this proposal, Li Deyu was receptive and thankful. However, after Li Zongmin consulted another associate, Yang Yuqing (楊虞卿) (Yang Rushi's cousin), Yang Yuqing opposed the idea, and Li Zongmin never actually recommended Li Deyu to be chief imperial censor. In 835, the officials Wang Fan (王璠) and Li Han (李漢) accused Li Deyu of having associated with Emperor Wenzong's brother
Li Cou the Prince of Zhang, hoping to support Li Cou as emperor to replace Emperor Wenzong. Emperor Wenzong, in anger, summoned a tribunal of chancellors to judge Li Deyu. Lu Sui spoke in defense of Li Deyu, and he was relieved of his duties and exiled to Yuan Prefecture (袁州, in modern
Yichun, Jiangxi) to serve as its secretary general. Lu himself suffered the consequences of being sent out to Zhenhai to serve as its military governor and, contrary to the regular official movements at the time, he was not allowed to meet with Emperor Wenzong before his departure. Soon thereafter, Zheng Zhu's associate
Jia Su was made chancellor. the eunuchs, led by
Qiu Shiliang and Yu Hongzhi (魚弘志), defeated Li Xun and his associates instead, leading to a general slaughter of many of the imperial administration officials by the Shence Armies, including the deaths of LI Xun, Zheng, the chancellors Wang Ya, Jia Su,
Shu Yuanyu, and other participants in Li Xun's plot, including Wang Fan, Luo Liyan (羅立言), Guo Xingyu (郭行餘), and Li Xiaoben (李孝本). In the aftermaths of the Ganlu Incident,
Li Shi and Zheng Tan were made chancellors, and while most of the power remained in the leading eunuchs' hands, it was said because of a severely worded petition filed by the military governor
Liu Congjian objecting to the deaths of Wang Ya and Jia, the powerful eunuchs began to show some restraint, allowing Emperor Wenzong and the chancellors to have some ability to govern. Meanwhile, Li Zongmin was moved closer to the capital, to be the military advisor to the prefect of
Heng Prefecture (modern
Hengyang in
Hunan). Henceforth, the officials accused of being partisans of Li Zongmin and Li Deyu were beginning to be allowed to move toward the capital. At the same time, Yang Yuling's son
Yang Sifu and
Li Jue, both viewed as Niu Faction leaders, became chancellors. When Yang Sifu subsequently tried to have Li Zongmin re-promoted, fellow chancellors Zheng Tan and
Chen Yixing, both of whom were viewed as Li Party leaders, opposed, and starting from this point, it was said that every policy discussion in the imperial administration would have partisan undertones. After a major verbal argument between the chancellors in 839, Yang offered to resign; instead, Chen and Zheng were relieved of their chancellor posts. In 839, with Emperor Wenzong being seriously ill, his favorite
concubine Consort Yang recommended his brother
Li Rong the Prince of An as crown prince—a move that was later suspected to be supported by Yang Sifu, who appeared to be her nephew. Li Jue, however, was opposed. Instead, Emperor Wenzong created Emperor Jingzong's youngest son
Li Chengmei the Prince of Chen crown prince. However, when Emperor Wenzong became even more ill in 840, Chou and Yu, wanting to use this opportunity to control the imperial succession, had an edict issued in Emperor Wenzong's name creating another brother of his,
Li Chan the Prince of Ying, crown prince instead. Emperor Wenzong soon died, and even before Li Chan took the throne formally, Consort Yang, Li Rong, and Li Chengmei were ordered to commit suicide, and many eunuchs and musicians who were personally close to Emperor Wenzong were either killed or exiled. Li Chan then took the throne (as Emperor Wuzong). == During Emperor Wuzong's reign ==