Li lived at a time when the
Tang dynasty was rapidly declining, after 200 years of prosperity. Culturally, politically, and economically, the Tang was one of the greatest periods in Chinese history. The cosmopolitan capital of
Chang'an was filled with traders from the Middle East and other parts of Asia where many Asian vassal states sent envoys to pay tribute. The empire covered a vast territory, the largest yet in Chinese history. Under the reign of Emperors
Gaozuyi through
Taizong,
Empress Wu, and
Emperor Xuanzong, the Tang empire steadily grew to the height of its prosperity. But after the
An Lushan Rebellion, the country's political and economic structure began to disintegrate. The rebel generals fighting against the Tang court during and after the rebellion were allowed to surrender and given military governor posts, even after the rebellion's leaders were vanquished. Peace and stability over the entire area of
Hebei was heavily bought by a compromise settlement. These provincial governors paid only lip service to the central government. The court, now weak and impotent, tolerated their growing independence, wary also of the aggression of the
Tibetans toward the northwest who posed a constant threat to the capital. During the subsequent years, military governors repeatedly challenged imperial authority with attempts to claim hereditary succession, resulting in revolts and bloodshed. Apart from this loss of control over the provincial military leaders and other problems at the frontiers, the Tang court was internally plagued by the increasingly powerful eunuchs and the fierce
Niu–Li factional strife.
Rise of the eunuchs The eunuchs first gained political influence as a group when
Gao Lishi helped
Emperor Xuanzong rise to power. Later,
Li Fuguo also helped put
Emperor Suzong on the throne. By gaining royal patronage, eunuchs gradually controlled personal access to the emperors and participated in the business of the central government. They also involved themselves with provincial appointments, at times even intervening with armed forces in disputes over imperial successions. By the time of Li Shangyin, the emperors had allowed the eunuchs to become fully entrenched both militarily and politically. After Xuanzong, all Tang emperors (except Jingzong) were put on the throne by the eunuchs.
Sweet Dew Incident In 835 the infamous
"Sweet Dew Incident" occurred during the reign of
Emperor Wenzong. A palace coup, designed by
Li Xun (the prime minister) and
Zheng Zhu (the military governor of
Fengxiang) in support of Wenzong's effort to overthrow the eunuchs, failed. The eunuchs, led by
Qiu Shiliang, slaughtered the clans of many high officials and chief ministers. Many other innocent people were killed in connection with this event. The eunuchs, whose power had been growing out of control, now completely dominated the Emperor and the affairs of state.
Niu-Li factional strife The
Niu-Li factional strife was another destructive internal force haunting the Tang court. The Niu and Li factions were not organized political parties, but two groups of rival politicians, hostile toward each other as a result of personal animosity. The Niu faction was represented by
Niu Sengru and
Li Zongmin and the Li faction by
Li Deyu. In the 830s the two contending factions created much turmoil in court through the reigns of Emperors
Muzong,
Jingzong,
Wenzong,
Wuzong, and
Xuanzong, a period coinciding almost exactly with Li Shangyin's life. According to
Chen Yinke, the struggle was also due to a difference in social background between the two groups, one representing the traditional ruling class of North China and the other the newly risen class of scholar-officials who reached their positions through the civil service examinations. In any case, many intellectuals and high officials were involved in this struggle. When members of one faction were in power, people associated with the other would be demoted, or out of favor. The factional strife kept court officials from uniting against the increasing power of the eunuchs.
Decline of the eunuchs The emperors, rendered completely helpless, tried to play one force against another. It was 50 years after Li Shangyin's death that the eunuchs were finally eradicated with the help of the military governors, precipitating the Tang dynasty's downfall. The 45 years of Li Shangyin's life spanned the reign of six emperors. Among them, Xianzong and Jingzong were murdered by the eunuchs. Muzong, Wuzong, and Xuanzong indulged in escapist practices; Wuzong, for example, died of an overdose of elixir drugs. ==Poetry==