# Li Wei (Tang dynasty)

Li Wei (李蔚; died November 20, 879), courtesy name Maoxiu (茂休), was an official of the Chinese Tang dynasty, serving as a chancellor during the reign of Emperor Xizong.

## Background and early career

It is not known when Li Wei was born. He was from the Guzang Branch of the Li clan of Longxi, which, like the Tang dynasty's imperial clan, claimed ancestry from Li Gao, the founder of the Sixteen Kingdoms period state Western Liang—with the Tang imperial clan descended from Li Gao's second son Li Xin (Western Liang's second duke) and Li Wei's ancestors descended from Li Gao's eighth son Li Fan (李翻) and Li Fan's son, the prominent Northern Wei general Li Bao (李寶). Subsequent male-line ancestors of Li Wei's served as officials of Northern Wei, the Sui dynasty, and Tang. Li Wei's grandfather Li Shanggong (李上公) served as the director of the archival bureau (秘書監, Mishu Jian), while his father Li Jingsu (李景素) served on the staff of a crown prince.
Li Wei himself passed the imperial examinations in the Jinshi class late in Emperor Wenzong's Kaifeng era (836–840) and was made an assistant to the military governor (jiedushi) of Shannan East Circuit (山南東道, headquartered in modern Xiangfan, Hubei). At some point thereafter, he apparently served as an assistant to the military governor of Hedong Circuit (河東, headquartered in modern Taiyuan, Shanxi). Late in the Huichang era (841–847) of Emperor Wenzong's brother and successor Emperor Wuzong, he passed a special imperial examination for those who made good rulings and was thereafter made an imperial censor with the title Jiancha Yushi (監察御史). He thereafter served as director of imperial palace affairs (殿中監, Dianzhong Jian). In 853, by which time Emperor Wuzong's uncle Emperor Xuānzong was emperor, Li Wei became in charge of the affairs of the Office of Censors. Thereafter, he became in charge of drafting imperial edicts and was made Zhongshu Sheren (中書舍人), a mid-level official at the legislative bureau of government (中書省, Zhongshu Sheng).

## During Emperor Yizong's reign

In 864, during the reign of Emperor Xuānzong's son Emperor Yizong, Li Wei was put in charge of the imperial examinations for that year at the ministry of rites (禮部, Libu). In 865, he was made the deputy minister of rites (禮部侍郎, Libu Shilang), and he was subsequently made Shangshu You Cheng (尚書右丞), one of the secretaries general of the executive bureau (尚書省, Shangshu Sheng). As he considered Emperor Yizong overly devout in Buddhism—with the emperor often holding grand feasts for large groups of Buddhist monks in the palace—he submitted a lengthy petition asking the emperor to curb his ways. Emperor Yizong praised him for the advice, but did not follow it. Li Wei later served as the mayor of Jingzhao Municipality (京兆, i.e., the region of the capital Chang'an), and then the minister of worship (太常卿, Taichang Qing). Yet later, he served as the military governor of Xuanwu Circuit (宣武, headquartered in modern Kaifeng, Henan), then of Huainan Circuit (淮南, headquartered in modern Yangzhou, Jiangsu). When his term as the military governor of Huainan was over, the people petitioned to have him remain as military governor, and Emperor Yizong agreed to a one-year extension.

## During Emperor Xizong's reign

At some point, Li Wei was recalled to Chang'an, and in 875, by which time he was chief imperial censor (御史大夫, Yushi Daifu), he was made Zhongshu Shilang (中書侍郎), the deputy head of the legislative bureau, and given the designation Tong Zhongshu Menxia Pingzhangshi (同中書門下平章事), making him a chancellor de facto.
Little is known about Li Wei's acts as a chancellor. In 878, he was removed from his chancellor position and made the defender of the eastern capital Luoyang. In 879, after Cui Jikang (崔季康) the military governor of Hedong was killed in a mutiny, and Cui's successor Li Kan (李侃) was not well liked by the soldiers, the imperial government decided that, because Li Wei had previously treated the people of Hedong well when he served there, to make him military governor. He arrived there late in 879 but died just three days after arrival.