Emperor Shunzong of Tang

His reign lasted less than a year, as, due to his illness, the powerful eunuchs were able to get him to approve a transfer of the throne to his son Li Chun (Emperor Xianzong).

[11][12] After the Jingyuan soldiers supported the general Zhu Ci as their emperor (of a new state of Qin), Zhu put Fengtian under siege, and Li Song was said to have personally participated in the defense of Fengtian, including personally encouraging soldiers and attending to the wounded.

[13] After the rebellion was put down and Emperor Dezong and his family returned to Chang'an, Li Song's position was endangered over an incident involving his grandaunt/mother-in-law Princess Gao.

[17] It was also said that it was Li Song's urging that Pei and another favorite of Emperor Dezong's, Wei Qumou (韋渠牟), who were poorly regarded by the people, were not made chancellors.

[9] By 803, Li Song had become close to two of his staff members—Wang Pi, who was also a talented calligrapher, and Wang Shuwen, who was good at playing Go.

At Wang Shuwen's suggestion, Li Song also began to gather a group of junior officials that Wang Shuwen had befriended and considered capable of being important officials and generals in the future, including Wei Zhiyi, Lu Chun (陸淳), Lü Wen (呂溫), Li Jingjian (李景儉), Han Ye (韓曄), Han Tai (韓泰), Chen Jian (陳諫), Liu Zongyuan, Liu Yuxi, Ling Zhun (凌準), and Cheng Yi, in anticipation of his future reign.

When subsequently, Emperor Dezong became ill as well, members of the imperial family attended to him, but Li Song was unable to do so.

He was attended to by the eunuch Li Zhongyan (李忠言) and his concubine Consort Niu, and it was said that the petitions submitted to him were ruled by him behind a screen.

They were particularly despised by several eunuchs who were powerful during Emperor Dezong's reign—Ju Wenzhen (俱文珍), Liu Guangqi (劉光琦), and Xue Yingzhen (薛盈珍).

At the instigations of those eunuchs, the imperial scholars Zheng Yin, Wei Cigong, Wang Ya, and Li Cheng were summoned to the palace for the purpose of drafting an edict to create Emperor Shunzong's oldest son Li Chun—who was described to be intelligent and decisive and who was feared by Wang Shuwen's group, particularly Consort Niu—crown prince.

Zheng Yin wrote down, "The Crown Prince should be the oldest son" and showed it to Emperor Shunzong, who nodded.

Liu Pi's superior Wei Gao, the military governor (Jiedushi) of Xichuan Circuit (西川, headquartered in modern Chengdu, Sichuan), subsequently submitted a harshly worded petition accusing Wang Shuwen and his associates of crimes, and also wrote a letter to Li Chun urging him to take over as regent.

Wei Gao's petition was subsequently echoed by other military governors Pei Jun (裴均) and Yan Shou (嚴綬), causing much alarm for Wang Shuwen and his associates.

[18] On July 19, Wang Shuwen was forced to leave governmental service when his mother died, to observe a period of mourning for her.

No one else dared to speak about this, but the Crown Prince comfortably discussed and reasoned about these matters, such that Emperor Dezong never made Pei or Wei chancellor.