Emperor Xuanzong of Tang (9th century)

Emperor Xuanzong of Tang (27 July 810 – 7 September 859) was an emperor of China's Tang dynasty, reigning from 25 April 846 until his death. Personally named Li Yi, later renamed Li Chen, and known before his reign as the Prince of Guang, he was considered the last capable emperor of Tang China. Succeeding emperors after Xuanzong would either be too young or be dominated by eunuchs or warlords. Emperor Xuanzong was the 13th son of Emperor Xianzong ((r. 806 – 820)) and an uncle of the previous three emperors, Emperor Jingzong, Emperor Wenzong, and Emperor Wuzong.

To distinguish Emperor Xuanzong from his ancestor Emperor Xuánzong (personal name Li Longji), as their memorial names are rendered identically in Wade–Giles and when pinyin tonal marks are not used, Xuanzong is occasionally referred to as Xuanzong II in western sources; in Chinese, however, their memorial titles (宣宗 for him and 玄宗 for Li Longji) are clearly distinct and this device is not used.

Background
Li Yi was born in 810, at Daming Palace (大明宮), as the 13th of 20 known sons of then-reigning Emperor Xianzong. His mother was Emperor Xianzong's concubine Consort Zheng, who had previously been a concubine of the warlord Li Qi and who, after imperial forces defeated Li Qi in 807, was taken into Emperor Xianzong's palace to be a servant girl to Emperor Xianzong's wife Consort Guo, but who at some point bore Li Yi for Emperor Xianzong. After Emperor Xianzong died in 820, Li Yi's older brother Li Heng, born of Consort Guo, became emperor (as Emperor Muzong), and in 821, when Emperor Muzong created a number of his sons and brothers to be imperial princes, Li Yi was created the Prince of Guang.

As imperial prince
In Li Yi's youth, he was said to be shy and a poor speaker, and (falsely) considered by others to be unintelligent. Later, during the reigns of Emperor Muzong's sons Emperor Wenzong and Emperor Wuzong, Li Yi was said to try to hide himself from the political scene, and rarely spoke anything at all. When the emperors visited the imperial princes' residences, known as the Sixteen Mansions, they would, as a game, try to get Li Yi to speak, and they referred to him as "Uncle Guang." It was said that Emperor Wuzong, who had an outgoing personality, particularly disrespected Li Yi.

In early 846, Emperor Wuzong became extremely ill and was himself rendered mute. The palace eunuchs gathered and decided on Li Yi as Emperor Wuzong's successor, probably because they considered him simple-minded and therefore easier to control. They had an edict issued in Emperor Wuzong's name creating Li Yi crown prince, changing his name to the more auspicious Li Chen, and investing him with authority over imperial affairs. It was said that when Li Chen met the officials in his new role as crown prince, they were astonished that the apparent simpleton exhibited punctilious adherence to the complex ritual expressions of grief for Wuzong, and immediate knowledgeable management of the court's pending business. Apparently, Li Chen's simple-mindedness had been an affectation, to make himself appear harmless during the dangerous intrigues of his predecessors' reigns. Soon thereafter, Emperor Wuzong died, and Li Chen took the throne (as Emperor Xuanzong).

Early reign
Emperor Xuanzong honored his mother Consort Zheng as empress dowager. Immediately after taking the throne, Emperor Xuanzong acted against the powerful chancellor Li Deyu, who had dominated the court during Emperor Wuzong's reign, as he despised Li Deyu for monopolizing power. Emperor Xuanzong removed Li Deyu from his chancellor position and sent him out of the capital Chang'an to serve as the military governor of Jingnan Circuit (荊南, headquartered in modern Jingzhou, Hubei), and also removed Li Deyu's fellow chancellor Zheng Su. Over the next few years, Emperor Xuanzong purged those officials he considered sympathetic to Li Deyu, and further pursued charges against Li Deyu based on Li Deyu having executed the minor official Wu Xiang (吳湘) on charges that should not have warranted death (Li Deyu was resentful of Wu Xiang's uncle Wu Wuling (吳武陵). Li Deyu was repeatedly demoted and sent farther and farther away from Chang'an, eventually dying in exile around the new year 850 in Yai Prefecture (崖州, in modern Haikou, Hainan). These actions were considered to have largely ended the factionalism among imperial officials known as the Niu–Li factional strife, which had plagued the imperial government ever since the reign of Emperor Muzong.

A number of policies that Emperor Wuzong and Li Deyu had pursued, including persecution against Buddhism and alliance with the Yenisei Kirghiz, were reversed. In Li Deyu's place, Emperor Xuanzong installed Bai Minzhong as the leading chancellor, and over the next few years, Bai recommended a number of other officials, including fellow chancellor Ma Zhi.

Meanwhile, Emperor Xuanzong also turned his attention to the Tibetan Empire, which had fallen into intense civil war after the death of its king Langdarma in 842. Starting in 848, and over a period of several years, Emperor Xuanzong commissioned border troops to recapture various prefectures lost to the Tibetan Empire since the An Lushan Rebellion, taking the region constituting modern eastern Gansu, southern Ningxia, and western Sichuan. Further, after the ethnic Han Chinese Zhang Yichao seized control of the Hexi Corridor from Tibetan officials and submitted to Emperor Xuanzong in 851, Tang had largely reversed the losses to the Tibetan Empire.

However, he initially had little success with rebellions by the Tanguts. After he came to realize that the Tanguts were repeatedly rebelling because of mistreatment by Tang officials, he modified the policies to install officials who were known for mild temper and honesty in the Tangut regions, and he further put Bai in charge of the operations against the Tanguts, giving him a large staff that included many well-known imperial government officials. With Bai overseeing the operations, the Tanguts largely submitted in 851. Bai, however, was not returned to chancellorship within Emperor Xuanzong's lifetime, and was effectively replaced by Linghu Tao.

Emperor Xuanzong was said to govern diligently, paying much attention to how his capable ancestor Emperor Taizong ruled and trying to follow Emperor Taizong's examples. He also took the time and effort to familiarize himself with imperial officials' capabilities, as well as the customs of the various prefectures throughout the realm, such that he could properly commission officials based on their abilities and review whether they were governing capably. He also encouraged frugality, and tried to demonstrate it by reducing the expenditures for the wedding of his favorite daughter Princess Wanshou to the imperial official Zheng Hao (鄭顥). It was said that throughout his reign, the imperial clan members and their relatives all carefully obeyed laws.

In 848, Emperor Muzong's mother Grand Empress Dowager Guo—whom Empress Dowager Zheng had previously been a servant for—died. Traditional historians noted that popular perception at the time was that Emperor Xuanzong might have murdered her. (It had said that she was depressed over Emperor Xuanzong's disrespect toward her, because Empress Dowager Zheng had resented her, and also because he suspected her and Emperor Muzong of having instigated the death of Emperor Xianzong at the hands of the eunuch Chen Hongzhi (陳弘志).) Initially, he would refuse to allow Grand Empress Dowager Guo to be buried with Emperor Xianzong or to be enshrined in Emperor Xianzong's temple, but eventually allowed her to be buried with Emperor Xianzong. (He would still refuse to enshrine her, however, with Emperor Xianzong, during his lifetime.)

Late reign
One of the major themes later in Emperor Xuanzong's reign was the high-level officials' concerns that he was not creating a Crown Prince, as this refusal to do so left the imperial succession uncertain. The issue was raised repeatedly, including by chancellors Wei Mo, Pei Xiu (Tang dynasty), and Cui Shenyou, but he rebuffed all of them, leading to Pei's resignation and Cui's removal. (The reason why Emperor Xuanzong repeatedly refused to create a crown prince was said to be his disfavor for his oldest son Li Wen the Prince of Yun and favor for his third son Li Zi the Prince of Kui. He wanted Li Zi to be his heir, but was hesitant to create Li Zi crown prince because Li Zi was not the oldest.)

Emperor Xuanzong was said to be careful in promoting and rewarding officials, such that it was not often that he rewarded officials with the highly honorable red and purple uniforms, and was also said to be fair in his promotions such that he did not unjustly favor those who were close to him. Further, he punished those who were close to him when they deserved to be punished, and did not spare them on account of their closeness to him. In order to make sure that the prefects that he commissioned were suitable for the prefectures, he required that they report to Chang'an to meet with him before heading to their posts. It was also said that he was stern, even with the chancellors, such that even though Linghu Tao was chancellor for 10 years, he continued to fear the emperor.

Meanwhile, Emperor Xuanzong also considered curbing the eunuchs' power, but could not think of a good way of doing so. On one occasion, when he conferred with the imperial scholar Wei Ao (韋澳), Wei told him that he was already the emperor who had exerted the most power over the eunuchs within recent memory—to which Emperor Xuanzong, appearing stressed, stated, "You are not correct. In reality, I am still fearful of them." He tried to promote eunuchs that he trusted such that they would wield power, but according to himself, this tactic was not particularly successful, as the eunuchs that he promoted, once they became highly ranked, joined with the less obedient powerful eunuchs as well. At one point, he discussed with Linghu the possibility of massacring the eunuchs, which Linghu opposed because Linghu feared that the innocent as well as the guilty would be harmed; Linghu instead suggested gradually reducing the eunuchs' numbers. Linghu's proposal was leaked to the eunuchs, and the eunuchs were said to continue to despise the imperial officials because of this.

Late in Emperor Xuanzong's reign, he came to favor certain alchemists who had promised him immortality, taking regularly the cinnabar-based pills which they manufactured and prescribed. It was said that as a result of poisoning by these pills, he became paranoid and easily angered, and by 859, as a further side effect of the consumption of these toxic, mercurial elixirs, he had developed a large ulcerous boil on his back, rendering him bedridden and unable to conduct meetings with his chancellors and other officials. He entrusted Li Zi to three high-level eunuchs that he favored—the directors of palace communications (Shumishi) Wang Guizhang (王歸長) and Ma Gongru (馬公儒) and the director of the southern court affairs (宣徽南院使, Xuanhui Nanyuanshi) Wang Jufang (王居方). After Emperor Xuanzong died, Wang Guizhang, Ma, and Wang Jufang did not initially announce his death, and were set to send one of the eunuch commanders of the Shence Armies (神策軍), Wang Zongshi (王宗實), who was not on good terms with them, out of Chang'an to Huai'nan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu) to serve as the eunuch monitor for Huai'nan. Wang Zongshi, however, reacted by intruding into the palace; finding that Emperor Xuanzong had already died from Chinese alchemical elixir poisoning, he arrested Wang Guizhang, Ma, and Wang Jufang for falsely issuing edicts, and then put them to death. He welcomed Li Wen to the palace, and then issued an edict in Emperor Xuanzong's name creating Li Wen crown prince and changing his name to Li Cui. The next day, Emperor Xuanzong's death was announced, and Li Cui became emperor (as Emperor Yizong).

Relations with Muslims
During Sulaiman al-Tajir's stay at the city of Guangzhou he noted that the Chinese used fingerprint records to maintain the identities of newly arrived foreigners and charged extortionate rates for imported goods, and that the route to China by sea was dangerous due to piracy and frequent rain. He mentioned that the local Muslim populace of Guangzhou had their own mosque and bazaars. He mentioned that the Muslim community had its own Imam and Judge (appointed by Emperor Xuanzong of Tang). He also observed the manufacturing of porcelain, the granary system of Guangzhou, and how its municipal administration functioned.

Legacy
Because of the prosperity of Emperor Xuanzong's reign, it was said that in subsequent years, including after Tang's eventual fall in 907, the people missed him bitterly, referring to him as "Little Taizong." The lead editor of the Old Book of Tang, the Later Jin chancellor Liu Xu, wrote of Emperor Xuanzong in glowing terms, while lamenting that much of the records from his reign had been lost by the time of Later Jin such that he could not write more. The lead editor of the New Book of Tang, Ouyang Xiu, however, commented that Emperor Xuanzong, while having good judgment, lacked kindness or grace.

During Emperor Xuanzong's reign, Chinese chemists first experimented with fireworks.

Chancellors during reign

 * Li Deyu (846)
 * Li Rangyi (846)
 * Li Hui (846–847)
 * Zheng Su (846)
 * Bai Minzhong (846–851)
 * Lu Shang (846–847)
 * Cui Yuanshi (847–848)
 * Wei Cong (847–848)
 * Ma Zhi (848–849)
 * Zhou Chi (848–849)
 * Cui Xuan (849–855)
 * Wei Fu (849–850)
 * Cui Guicong (850–851)
 * Linghu Tao (850–859)
 * Wei Mo (851–857)
 * Pei Xiu (852–856)
 * Zheng Lang (856–857)
 * Cui Shenyou (856–858)
 * Xiao Ye (857–859)
 * Liu Zhuan (858)
 * Xiahou Zi (858–859)
 * Jiang Shen (858–859)

Family
Consorts and Issue:
 * Empress Yuanzhao, of the Chao clan (元昭皇后 晁氏)
 * Li Cui, Yizong (懿宗 李漼; 833–873), first son
 * Princess Wanshou (萬壽公主/万寿公主), first daughter
 * Married Zheng Hao of Xingyang (滎陽 鄭顥/荥阳 郑颢; 817–860) in 850, and had issue (one son)
 * Princess Guangde (廣德公主/广德公主 d. 880), fourth daughter
 * Married Yu Cong of Henan (河南; d. 881) in 858
 * Zhaoyi, of the Wu clan (昭儀 吳氏/昭仪 吴氏)
 * Li Zi, Prince Tong (通王 李滋; 844–863), third son
 * Jieyu, of the Zhang clan (张婕妤)
 * Jieyu, of the Liu clan (婕妤 柳氏)
 * Li Rui, Prince Zhao (昭王 李汭), eighth son
 * Cairen, of the Shi clan (才人 史氏)
 * Li Yi, Prince Qing (慶王 李沂/庆王 李沂; 844–860), fourth son
 * Cairen, of the Qiu clan (才人 仇氏; 828–851)
 * Li Wen, Prince Kang (康王 李汶; 851–866), ninth son
 * Lady, of the Chen clan (陳氏/陈氏)
 * Li Yong, Prince Guang (廣王 李澭/广王 李澭; 854–877), 11th son
 * Unknown
 * Li Mei, Crown Prince Jinghuai (靖懷皇太子 李渼/靖怀皇太子 李渼; 836–852)
 * Li Jing, Prince Ya (雅王 李涇/雅王 李泾; b. 839), second son
 * Li Ze, Prince Pu (濮王 李澤/濮王 李泽), fifth son
 * Li Run, Prince E (鄂王 李潤/鄂王 李润; d. 876), sixth son
 * Li Qia, Prince Huai (懷王 李洽/怀王 李洽), seventh son
 * Li Guan, Prince Wei (衛王 李灌/卫王 李灌; d. 860)
 * Princess Yongfu (永福公主), second daughter
 * Princess Qigonghuai (齊恭懷公主/齐恭怀公主), third daughter
 * Married Yan Qi (嚴祁/严祁)
 * Princess Heyi (和義公主/和义公主), fifth daughter
 * Princess Rao'an (饒安公主/饶安公主), sixth daughter
 * Princess Shengtang (盛唐公主), seventh daughter
 * Princess Pingyuan (平原公主; 834–863), 11th daughter
 * Princess Tangyang (唐陽公主/唐阳公主)
 * Princess Xuchang Zhuangsu (許昌莊肅公主/许昌庄肃公主)
 * Married Liu Zhi of Hedong (河東 柳陟)
 * Princess Fengyang (豐陽公主)

In fiction
Played by Moses Chan, a fictionalized version of Xuanzong was portrayed in 2009 Hong Kong's TVB television series, Beyond the Realm of Conscience.