During the reign of Emperor Yang 隋煬帝 (r. 604-617) of the Sui dynasty 隋 (581-618), when numerous peasant rebellions shook the foundations of the empire, Li Yuan 李淵 was appointed appeasing commissioner (weifu dashi 慰撫大使) of the northwestern region, and as resident regent staying in the capital to take care of things (liushou 留守) of Taiyuan 太原 (modern Taiyuan, Shanxi), with the order to prevent the Türks 突厥 from intruding onto Chinese soil, and in order to quell the rebellions that threatened many local governments.
In 617, Li Yuan staged an rebellion himself, supported by Pei Ji 裴寂, Liu Wenjing 劉文靜, and his sons Li Jiancheng 李建成 and Li Shimin 李世民. In absence of the Sui emperor the rebels took the capital Chang’an 長安 (modern Xi'an 西安, Shaanxi), deposed Emperor Yang and installed the Prince of Dai 代, Yang You 楊侑, as the new emperor (posthumous title Emperor Gong 隋恭帝, r. 617-618). Shortly later Emperor Yang was killed and Li Yuan, once rewarded with the title of King of Tang 唐, decided to end the Sui dynasty and to founded his own dynasty that he called Tang. His own posthumous title is Emperor Gaozu 唐高祖 (r. 618-626).
The first task of the new dynasty was to put down the rebellions, first that of Xue Ju 薛舉 in the northwest, then the northeast, the Gansu corridor 甘肅走廊, and the usurpers Dou Jiande 竇建德 and Wang Shichong 王世充 in the Yellow River plain 中原, and finally Du Fuwei 杜伏威 in the River Huai 淮河 area. In 625 most of the territory of China was occupied by the Tang Dynasty. Only one year later Li Shimin charged a plot against the crown prince, killed his brothers and forced his own father to rend over the throne to him. In 628 Li Shimin proclaimed himself emperor (posthumous title Tang Taizong 唐太宗).
After this initial phase the first half of the Tang period is characterized by the long reign-period Zhenguan 貞觀 "Incorruptible Admiration" (627-649) of Emperor Taizong 唐太宗 (r. 626-649), the usurpation of the throne by Empress Wu Zetian 武則天 who founded her own dynasty, and the first half of Emperor Xuanzong's 唐玄宗 (r. 712-755) reign, before the rebellion of An Lushan 安祿山 largely ended the central government's control over the provinces.
Emperor Taizong is known as a successful general and a far-sighted politician who knew to employ the talents of faithful ministers like Fang Xuanling 房玄齡, Wei Zheng 魏徵, and Du Ruhui 杜如晦, and he is even reknown even as poet. The most important information on early Tang statecraft is assembled in the compendium Zhenguan zhengyao 貞觀政要 "Essential about Politics from the Zhenguan reign-period". In 649 Emperor Taizong died, and during the reign of his son Li Zhi 李治 (posthumous title Emperor Gaozong 唐高宗, r. 649-683) Empress Wu Zetian gradually took over the control of the Inner Court (neichao 內朝, as opposed to the sphere of the ministers, the outer court waichao 外朝). She eliminated female competitors for power, like Empress Wang 王后 and Empress Zhangsun 長孫后. In order to ensure her position Wu Zetian forced Prince Zhangsun Wuji 長孫無忌 to commit suicide.
After Emperor Gaozong's death she enthroned Li Xian 李顯 as emperor (posthumous title Emperor Zhongzong 唐中宗, r. 683-684, 705-709), but soon changed the emperor and enthroned Li Dan 李旦 (posthumous title Emperor Ruizong 唐睿宗, r. 684, 710-712). After a hesitating phase, in which she acted as regent, she decided in 690 to mount the throne herself. Empress Wu Zetian was the only female emperor in Chinese history. Her throne accession was accompanied by bloody murders of throne pretendants and ministers that tried to oppose her.
Instead of relying on state officials from the traditional families in court positions she created a ladder of official career that made the ranks of state officials accessible to everyone with sufficient talents and without having personal relationships to the ruling circles. She restricted the number of slaves within the noble households and restructured the classification system of eminent families in the Xingshilu 姓氏錄 regulations.
Empress Wu encouraged agricultural acitivities in order to raise the economic output and the national revenue. During her fifteen years long reign the economic situation of the empire was indeed formidable, but this situation can be led back to the fundamental regulations created by Emperor Taizong. At the same time, the so-called "equal-field system" (juntianfa 均田法), invented during the Northern Wei period 北魏 (386-534), began to show its inaptness to meet the growing fiscal needs of the state treasure, and the difference between economic theory and practice became evident.
Yet Empress Wu Zetian also spent a lot of funds on the construction of Buddhist monasteries and temples and exploited the peasants' workforce for religious projects like in the enlargement of the Longmen Grottoes 龍門石窟.
After the Empress' enforced retirement and death in 705 her infamous collaborators Zhang Changzong 張昌宗 and his brother Zhang Yizhi 張易之 were killed by a court faction led by Zhang Jianzhi 張柬之, Cui Xuanwei 崔玄暐, and Li Xian (Emperor Zongzong) was again enthroned. Yet the court was controlled by the family of Empress Wei 韋后, her daughter Princess Anle 安樂公主 and Wu Sansi 武三思, a relative of late Empress Wu Zetian. In 710 Empress Wei enthroned the under-age prince Li Chongmao 李重茂 (posthumous title Emperor Shang 唐殤帝, r. 710). Only the rebellion of Prince Li Longji 李隆基 could reestablish the power of the house of Li 李, and the deposed Emperor Ruizong was re-enthroned. Princess Taiping 太平公主 was the last imperial woman that challenged the ruling house, and in 712 Ruizong abdicated in favour to Li Longji (posthumous title Emperor Xuanzong 唐玄宗, r. 712-755).
The fourty years long rule of Emperor Xuanzong was a period of glory for the ruling house of Li, especially during his reign-periods Kaiyuan 開元 "Opening the Origin" (713-741) and Tianbao 天寶 "Heavenly Treasure" (742-755), but the last years of his reign, when he became senile, show clearly the deficiencies of the Tang government, administration and institutions. With the assistance of competent ministers and state officials like Yao Chong 姚衝, Song Jing 宋璟, Yuwen Rong 宇文融, Xiao Song 蕭嵩, Pei Guangting 裴光庭, Zhang Jiazhen 張嘉貞, Han Xiu 韓休 and Zhang Jiuling 張九齡, Emperor Xuanzong first started a politics of austerity to reconsolidate the state finances. Furthermore, the socio-economic and political changes at China's borders made it necessary to undergo several institutional changes and reforms.
The old equal-field allotment system (juntianfa 均田法) with the poll tax (dingfu 丁賦) and field tax (tianfu 田賦) became more and more ineffective, new land was scarce, and more and more indebted peasants sold their land, only to find themselves as tenant farmers on the same ground. Yet this procedure was also a method to escape taxation. Yuwen Rong made an attempt to register people and their households that were trying to escape tax liability (kuohu 括戶). Furthermore, he decided that the duty of corvée labour in the grain-material-labour tax system (zuyongdiao 租庸調) could be effected in the shape of money. In order to save cost during the transportation of grain from the lower Yangtze area, China's grainhouse, to the capital region around Chang'an, the transport system was rearranged to a relay system in which grain was stored in state granaries (zhengcang 正倉, yicang 易倉), instead of shipping each load of grain the whole way.
Before the era of Emperor Xuanzong the office of the Counsellor-in-chief (zaixiang 宰相) was in most cases occupied with a person that concurrently acted as Vice Director of the Imperial Secretariat (shangshu puye, sic! 尚書僕射), with the duty to oversee the Six Ministries (liubu 六部). A government reform resulted in the creation of a Chancellery (menxiasheng 門下省) with six departments (fang 房) that were mirroring the Six Ministries in function and that were to take over the responsibility of the official ministries. From then on, more and more tasks were taken over by persons with ad-hoc offices on a temporary basis (chaiqian 差遣). In such a way the official bureaucracy could be bypassed, and decisions were more easily to be made. Under Emperor Xuanzong graduates from the Hanlin Academy 翰林院 became more important than the official functionaries in the central government.
Yet the most important changes during the reign of Emperor Xuanzong were made in the field of military adminstration. The military units were normally composed of a large percentage of peasant conscripts (zhengbing 征兵, mubing 募兵) that had to fulfil military service as part of their corvée obligations. These military units were called garrison militia (fubing 府兵). They proved insufficient to defend the whole empire, and it was deliberated whether those conscripts should be replaced by a professional military, especially in the border regions. From 711 on, therefore, regular troops were garrisoned at the northern and northwestern borders, and ten military commissioners or military commissioners (jiedushi 節度使) were appointed that were to take over the protection of these frontiers. The border troops were from them on mercenary soldiers (changzheng jian'er 長征健兒). The palace guard (jinjun 禁軍) was likewise replaced by permanently employed professional soldiers (kuoji 彍騎 or changcong suwei 長從宿衛 "permanent palace guard").
While the financial reforms were not deep enough to save the state treasury from permanent leaking, the changes whithin the military system imposed a financial burden on the state and, much more dangerous, caused the emergence of quasi-independent regional governors because the military commissioners had the full military and civil authority in their region, including the disposal over the local tax revenue.
From 722 on Li Linfu 李林甫 served as Counsellor-in-chief, a position he occupied for 19 years and that endowed him with almost dictatorial power because Emperor Xuanzong more and more withdrew from daily business and preferred engaging in arts and belles-lettres. Wars with the neighbouring states of Tubo 吐藩 (Tibet) and Nanzhao 南詔 (modern Yunnan) and with the steppe federation of the Khitans 契丹 in the northeast emptied the state treasury. There was no effective tax system to resolve the problem of producing a sufficient revenue. From 743 on a concubine named Yang Yuhuan 楊玉環 (better known as Yang Guifei 楊貴妃) cought the attention of the ageing emperor, and relatives of her and her family gained important positions in the political arena. Her brother Yang Guozhong 楊國忠 succeeded Li Linfu as Counsellor-in-chief. Also, eunuchs like Gao Lishi 高力士 and later Li Fuguo 李輔國 could obtain more and more influence on the senile emperor's decisions.
Like during the Han period 漢 (206 BCE-220 CE) the pressure of foreign peoples raiding the frontiers caused the Chinese government to search for methods to appease these border peoples. It was finally decided to resort to warfare and to conquer their territory. The neighbours of the Tang empire were the Türks 突厥, later the Uyghurs (Huihe 回紇, later Huigu 回鶻), the Tibetan empire of Tubo 吐藩, the kingdom of Nanzhao 南詔 (modern Yunnan), and the northeastern peoples of the Khitans and Mohe 靺鞨 as well as the three Korean kingdoms Koguryŏ, Paekche and Silla, and the kingdom of Bohai 渤海 (Parhae).
The first khanate of the Türks was founded by Ashna Tumen 阿史那土門 (called Ili Khaghan 伊利可汗) in 552, the Türkish people occupied the Dzungar Basin but were defeated in 583 by armies of the Sui dynasty and divided into the Eastern Türks 東突厥 and the Western Türks 西突厥.
The Eastern Türks permanently attacked the border regions of the Sui and the following Tang empire and undertook raids and lootings of Chinese territory as east as close to the capital Chang'an. In 629 finally Tang troops under the generals Li Qing 李清 and Li Ji 李勣 defeated the Türks and captured Jieli Khaghan 頡利可汗, their ruler. The Eastern Türk empire had therewith ended, and the areas inhabited by them were administered by Türkish chieftains that were then appointed as imperial commanders-in-chief (dudu 督都) of the Tang empire, yet many Türks were also resettled around the Tang capital and therewith served as hosts for the Tang government to prevent the Eastern Türkish khan to rebel.
The Türkish people of the Syr Tarduš (Xueyantuo 薛延陀) that still controled large parts of the north were defeated in 646 and from then on checked in an administration unit called protectorate (duhufu 督護府) of Yanran 燕然. The Western Türks controled the Tarim Basin and the Silk Road. In 640 the Tang general Hou Junji 侯君集 conquered the city state of Gaochang 高昌 and created the prefectures of Xizhou 西州 and Tingzhou 庭州 within the Protectorate of the Pacified West (Anxi duhufu 安西督護府) in Jiaohe 交河 (near modern Turfan 吐魯番, Xinjiang).
In the next years the Tarim Basin was successively conquered by Tang troops and was from now on administered by the four defense commands (sizhen 四鎮: Qiuci 龜茲 [Kuča], Yanqi 焉耆 [Karašahr], Yutian 于闐 [Khotan], and Shule 疏勒 [Kašgar]). General Su Dingfang 蘇定方 destroyed the last military units of the Western Türks in 657. The Dzungar Basin was administered as protectorate Beiting 北庭 from 702 on. The territorial progress of the Tang empire was stopped in the year 751 during the battle at Talas (Daluosi 怛羅斯, modern Džambul, Kazakhstan) when general Gao Xianzhi 高仙芝 was defeated by the Persians. Under Ashna Guduolu 阿史那骨咄祿 (Jiedielish Khaghan 頡跌利施可汗) the Türks were again reunited around 680 in an empire called that of the Later Türks 後突厥. Yet the Türks had already lost their belligent way of life, many of them had become sedentary or semi-sedentary, and a regular trade with Tang China contributed to the economical prosperity of both the Türks and Tang China. The most important trade goods were silks and horses. In 774 the Later Türk federation was destroyed by the Uyghurs.
The Uyghurs were a Türkish tribe of the federation of the Tölöš (Tiele 鐵勒). They defeated the Eastern Türks and made themselves free of the domination by the Syr Tarduš in 646. The territory roamed by the Uyghurs was in 662 transformed into a Chinese protectorate called Hanhai 瀚海. From the eighth century on the Uyghurs migrated into the areas of modern Gansu and destroyed the federation of the Later Türks. Their ruler Kutlug Bilge Köl Khagan 骨咄祿毗伽闕可汗 was accepted as foreign sovereign by the Tang empire and bestowed the title of Huairen Khaghan 懷仁可汗. Uyghur troops had a dominant position during the suppression of the rebellion of An Lushan in the 750es, any many Türkish units stayed within Chinese territory after Tang China was again pacified. During the turbulent times of the An Lushan rebellion Tang China lost her colonies in the Western Territories. These were from then on controlled by the Uyghurs and the Tibetan empire of Tubo. The Uyghur empire was destroyed by the Qirqizes (Xiajiasi 黠戛斯) in 840.
The empire of the proto-Mongolian Tuyuhun 吐谷渾 in the Tsaidam Basin (modern Qinghai) existed since the fourth century and was reigned and inhabited by various people of Xianbei 鮮卑, Di 氐 and Qiang 羌 origin. General Li Jing 李靖 defeated the Tuyuhun empire in 635 and incorporated it into the Tang empire, but in 663 the Tsaidam Basin became part of the Tibetan empire of Tubo.
The Tibetan empire of Tubo 吐藩 had been founded by King Srong Tsan Sgam Po (r. 618-641) as a unification of the many territories hitherto reigned by independent chieftains. From 634 on the Tang empire undertook a nuptial diplomacy with the king of Tubo and sent Princess Wencheng 文成公主 as a bride in order to strengthen the political ties with Tubo. During the disturbances of the An Lushan rebellion Tubo occupied the southern part of the Silk Road, and Tang China lost the colonies in the Western Territories. In 763 Tibetan troops even endangered the Tang capital Chang'an. Nonetheless, at least superfacially good diplomatical relations were resumed in 821, and a high stele erected in Lhasa and still standing today gives report about the peace treaty between Tubo and Tang China. General Zhang Yichao 張儀潮 was able to reconquer part of the Western Territories in 848, but this was only a short-time gain.
The kingdom of Nanzhao in the region of modern Yunnan with the capital at Dali 大里 (modern Dali, Yunnan) was founded in 649 and then again in 779. In 738 the Tang empire made the ruler of Nanzhao king of Yunnan 雲南. Nanzhao often changed side with China and Tubo but was never conquered by Tang troops. In 902 the short-lived state of Changhe 長和 replaced Nanzhao.
In the northeast, the nomad people of the Khitans dominated the western part of modern Manchuria. They became subject to the Tang in the area-command (dudufu 督都府) of Songmo 松漠. Although the Khitans often staged raids on Chinese territory and had to be pushed back to the north several times, they never really endangered the Tang empire. Only at the end of the ninth century their federation became stronger and started to put a serious threat to the northeastern military commissions.
More the the east, in the eastern parts of Manchuria, lived the peoples of Sushen 肅慎 and Mohe that founded the kingdom of Zhen 震 in 698. Their king Da Zuorong 大祚榮 became nominally commander-in-chief (dudu 督都) of the Tang empire and was given the title of king of Bohai, a kingdom that replaced the old Korean state of Koguryŏ.
Among the three kingdoms in Korea, Silla (Chinese: Xinluo 新羅) became an ally of the Sui and later the Tang empire. The northern kingdom of Koguryŏ (Chinese: Gaogouli 高句麗) sought the support of the Türks, and the kingdom of Paekche (Chinese: Baiji 百濟) in the south that of the Japanese to withstand the pressure from the Sui troops in 598. The Koreans heavily defeated the Sui armies in 612. Koguryŏ established a fortification wall along its borders and could again withstand an attack by the Chinese in 645. It was only the united forces of Silla and Tang China (with a flot under Su Dingfang 蘇定方 and land-based armies under Li Ji 李勣) that were able to defeat the states of Paekche and Koguryŏ. Tang China established the Protectorate of the Pacified East (Andong duhufu 安東督護府) but was in 671 forced by Silla to withdraw to the Liaodong 遼東 area. Silla was not the only dominating force on the Korean peninsula that was able to remain independant from China. The northern part of old Koguryŏ became part of the two kingdoms of Bohai and Fuyu 扶余 (Puyŏ). Nonetheless, a cultural exchange took place in a very intensive way, and Korea imported Chinese writings, arts, ideas and religions.
From the first years of the Tianbao reign-period 天寶 (741-757) on Li Linfu served as Counsellor-in-chief. After his death in 752, his opponent Yang Guozhong 楊國忠 became Chief Counsellor and dominated the court until the rebellion of An Lushan. An Lushan himself, half of Türkish origin, had been installed as a military commissioner (jiedushi 節度使) of Pinglu 平盧, Fanyang 范陽 (around modern Beijing) and Hebei 河北, three regions in the northeast, where he was responsible for the military and civilian administration of one of the most important economic zones of Tang China. Although Yang Guozhong on several occasions urged Emperor Xuanzong to prepare against an eventual rebellion of An Lushan, the mighty military leader in the northeast was sure of the old emperor's confidence.
In 755 finally, when his plans of a rebellion became too obvious, he staged his uprising, and within only a few months conquered the Yellow River plain, occupied the secondary capital Luoyang 洛陽 (modern Luoyang, Henan) and was about to enter the capital region by the Tongguan Pass 潼關. The generals Feng Changqing 封常清 and Gao Xianzhi 高仙芝 held the pass but were executed because of their failure to suppress the rebellion. From then on, fresh generals took over the fight against the rebel An Lushan: Yan Gaoqing 顏杲卿, Yan Zhenqing 顏真卿, Guo Ziyi 郭子儀, Li Guangbi 李光弼, and the mighty Türkish general Geshu Han 哥舒翰. An Lushan who had proclaimed himself emperor of Yan 燕 had lost large territories in the east because many local magistrates and military units of the local administration refused to support him.
When the rebel troops advanced to the capital Chang'an, the court decied to evacuate the capital and to flee to Sichuan. At Mawei station 馬嵬驛 the troops killed Yang Guozhong and forced his sister, the emperor's favourite Yang Guifei 楊貴妃, to hang herself. The dramatic story of the loss of Tang Xuanzong's beloved concubine is retold in the Qing period 清 (1644-1911) theatre play Changshengdian 長生殿 "The Hall of Everlasting Life".
The Emperor's son Li Heng 李亨 had escaped to the northwest and proclaimed himself emperor (posthumous title Emperor Suzong 唐肅宗 , r. 756-762) and so usurped the throne of his father. The victory of An Lushan over the Tang troops was only shortlived: he was murdered by his own son An Qingxu 安慶緒 in 757. Supported by Uyghur troops and the garrisons from the Western Territories, Chang'an was soon liberated. An Qingxu withdrew to Fangyang where he united his forces with Shi Siming 史思明, the then-military commissioner of that region and a former fellow of An Lushan. Shi Siming killed An Qingxu, proclaimed himself emperor in 759 and continued the rebellion that is known to Chinese historians as the rebellion of An [Lushan] and Shi [Siming] (An Shi zhi luan 安史之亂). Shi Siming conquered Luoyang but suffered the same fate as An Lushan: he was killed by his own son Shi Chaoyi 史朝義 in 761 who continued the rebellion but was finally defeated in 762.
The rebellion of An Lushan was a turning-point in the history of the Tang dynasty. The central government lost its control over much of the Chinese territory. Many provinces were from then on quasi independently governed by military commissioners with all political and economical consequences. The economy, especially that of northern China, was thoroughly disturbed. Third, China had lost her Western regions to the Tibetans and to the Uyghurs that had advanced into these areas during the years of the rebellion.
The An Lushan rebellion had a deep impact on the financial situation of the central government. On the one hand, much of the economy in northern China had suffered heavy losses, peasants were uprooted, owned no land and could pay no taxes, on the other hand, what was left from the economy in the north was controled by mighty military governors who collected taxes for themselves and not for the imperial court in Chang'an. For a long time, seventy percent of the tax revenue of the Tang court came from the state monopoly on the production and merchandise of salt. The other part should be provided from a poll tax payed by free peasants and their households, irrespectible of the size and the income of the households. Many peasants therefore tried to evade taxes by working as non-tax liable tenant farmers for large land owners. This situation made a deepgoing tax reform inevitable.
Under Emperor Suzong the transport and salt-iron-commissioner (zhuanyun-yantieshi 轉運鹽鐵使) Liu Yan 劉晏 reformed the transport system for grain, the salt monopoly and the price control of salt and grain. The grain transport along the Grand Canal from the lower Yangtze region to the Capital was undertaken by state officials instead of merchants, and the grain was only transported in a relay modus with reloading and repacking. The production of salt was in the hand of the state who sold the salt to merchants and commissioned them with the marketization of it. In areas remote from the salt sources (sea salt at the coast, lake salt in Shanxi, and well salt in Sichuan) the salt was piled up in store-rooms to regulate the price in times of shortages.
Under Emperor Dezong 唐德宗 (r. 779-804) Chief Counsellor Yang Yan 楊炎 reformed the tax system. Instead of a poll tax (tax per household), a ground tax became the criterion for taxation, and the tax-liable households were taxed by the size of their land and the production output. The old threefold tax system of grain, cloth and corvée labour(zuyongdiao 租庸調) was given up, and instead, two times per year each household was taxed according to its income (liangshuifa 兩稅法 "twice-taxation system"). The state bought the grain from the producers and stored it in state granaries. It was believed that the state would by this means be able to regulate the price and to counter the methods of "hoarding grain" by profiteers. In fact the task of price regulation was not easy because the grain price was also determined by the amount of money in circulation, and the Tang state was always lacking coins. The shortage of coins was even more aggravated because people used to cast bronze objects from the precious coins. Besides salt the government also controlled the production and saled of tea and yeast for brewing alcohols, at least in the last decades of the 8th century.
Broader reforms were also undertaken under Emperor Xianzong 唐憲宗 (r. 805-820) at the beginning of the 9th century. High ministers like Li Jiang 李絳, Li Jifu 李吉甫 and Pei Du 裴度 introduced a tax quota that had to be delivered by the regional administration. Other ministers like Yang Huilin 楊惠琳 and Wu Yuanji 吳元濟 proposed a measure to restrict the political and economic power of the military governors by dividing and reducing the size of their command areas.
The military commissions (or military gouvernements, fangzhen 方鎮) had actually been implemented to protect the borders against foreign invaders in the north. The military protection of the border was a task too important to give these institutions up, although the extraordinary power of the military commissioners had clearly been demonstated during the rebellion of An Lushan. The office of military commissioner soon became even a hereditary post, with whole "dynasties" of commissioners, and from the 780es on the military governors permanently challenged the power of the Tang court. Two governors even proclaimed themselves emperor: Zhu Zi 朱泚 (as emperor of Qin 秦) and Li Xiaolie 李孝烈 (empire of Chu 楚), both in 781.
Larger wars with military governors took place in the years 806-813, 815-818 and in 843. Yet the military governors did not only challenge the power of the political center, they also fulfilled their duty as protecting force against intruding enemies. Guo Ziyi 郭子議 and Pugu Huaien 僕固懷恩, for instance, defeated the troops of Tubo and of the Tanguts (Dangxiang 黨項) in 763.
Lu Zhi 陸贄 and Pei Yanling 裴延齡 therefore tried to control the power of the military governors, but both were militarily defeated, and Emperor Dezong 唐德宗 (r. 779-804) had to leave Chang'an. From then on another group of persons was able to take over control of the inner court: the eunuchs.
While the eunuchs did not play a significant role during the first half of the Tang period, they became an important factor after the An Lushan rebellion. The first eunuch influencing a Tang emperor was Emperor Xuanzong's minion Gao Lishi 高力士. Under the emperors Daizong 唐代宗 (r. 762-779) and Dezong eunuchs like Cheng Yuanzhen 程元振, Yu Chao'en 魚朝恩, Dou Wenchang 窦文場 and Huo Xianming 霍仙鳴 even obtained the command over the imperial guards (shencejun 神策軍), controlled the Palace Secretariat (shumiyuan 樞密院) and even determined the throne succession: Li Fuguo 李輔國 enthroned Li Yu 李豫 (Emperor Daizong) against the will of Empress Zhang 張后, Chen Hongzhi 陳弘志 killed Emperor Xianzong 唐憲宗 (r. 805-820) and installed Li Heng 李恒 (posthumous title Emperor Muzong 唐穆宗, r. 820-824), Chou Shiliang 仇士良 chose Li Yan 李炎 (posthumous title Emperor Wuzong 唐武宗, r. 840-846) to follow Emperor Wenzong 唐文宗 (r. 826-840).
On two occasions state officials sought to destroy the eunuch power: The first plot was in 805 when Wang Shuwen 王叔文 and Wang Pi 王伾 and famous scholars like Liu Zongyuan 柳宗元 and Liu Yuxi 劉禹錫 tried to overcome the eunuchs. The eunuch Ju Wenzhen 俱文珍 called some military commissioners for help and suppressed the plot of the state officials (known as the "two Wangs and eight commanders", Er Wang ba sima 二王八司馬). Thirty years later, Li Xun 李訓 and Zheng Zhu 鄭注 stood up against the eunuchs under Wang Shoucheng 王守澄 who had assassinated the emperors Xianzong and Jingzong 唐敬宗 (r. 824-826). But the eunuchs took Emperor Wenzong as a host and stayed untouched in their powerful position (the so-called Ganlu 甘露 incident of 835).
Under the reign of the emperors Xianzong and Xuanzong 唐宣宗 (r. 846-859) the state officials at the central government were divided into two large groups, parties or factions whose members fought against each other and strove for political dominance (known as the Niu-Li factional strive, Niu-Li dangzheng 牛李黨爭). Leader of the traditionalist faction was Niu Sengru 牛僧孺, leader of the reformist group was Li Deyu 李德裕, son of the Chief Counsellor Li Jifu 李吉甫. The binding element within the factions were not political motifs or ideological differences but rather personal ties and the aim to obtain as much power as possible for lobbyists and their retainers. More and more state officials did not take part in the official way of recruitment as classicists (mingjing 明經) or by passing the state examinations (xuanju 選舉), but rather came from military offices that allowed them access to the echelons of the central government.
In 845 the great persecution of Buddhists took place (according to the reign-period called the Huichang persecution, Huichang fei Fo 會昌廢佛). The economic activities of the rich monasteries, the luxury within the monasteries' walls contrasted with the fiscal austerity to which the central government was forced, the fact that many people tried to evade taxes by submitting themselves to the clerical orders, the fact that monasteries, although many of them owned large tracts of land, were tax-exempted, and the rise of Daoism and a revival of Confucianism led to this organized proscription of the Buddhist clergy and their possession under Emperor Wuzong. Already Emperor Xuanzong, a faithful believer in Daoism, had occasionally undertaken persecutions against Buddhists. Buddhism in China never recovered from this persecution and from then on never again played a role in politics.
The permanent struggles among the military commissioners resulted in significant rises of the taxes, and because many peasants had left their homelands, the burden for the remaining landlords consequently rose. Except the extremely high land and grain taxes, the rising salt price caused many peasants to take part in the popular uprisings that shook the Tang empire from the 850es on. Some stateofficials like the Hanlin scholar Liu Yunzhang 劉允章 therefore criticized the socio-economic situation during the reign of Emperor Wen 唐文宗 (r. 826-840).
The first rebellion that shook the fundaments of late Tang China was the peasant uprising of Yuan Chao 袁晁 in 762-763 in the lower Yangtze area, just after the suppression of the An Lushan rebellion. In 859 Qiu Fu 裘甫 led a peasant rebellion in the area modern Zhejiang. Qiu saw himself as delegate of Heaven, proclaimed his own reign mottos and had coins cast, but his revolt was soon suppressed by Tang troops. Of slight difference was the rebellion of Pang Xun 龐勛 in 868 that started as a kind of desertion of Xuzhou 徐州 soldiers garrisoned in Guizhou 桂州 that wanted to return home after an overdue end of military service. The court allowed their return ex post, but when they could not enter the town of Xuzhou, the soldiers began to riot and were soon joined by numerous peasants. Tang armies were able to suppress the unrest only one year later.
These few rebellions had been locally restricted and were soon pacified. Not so the uprising of the salt traders Wang Xianzhi 王仙芝, Shang Rang 尚讓 and Huang Chao 黃巢 in the region of modern Henan in 875. These three rebels were able to create a peasant army that was far larger and stronger than the rebellions before. Within a few months they controled the whole Yellow River plain, conquered Luoyang and the capital Chang'an and even advanced far into the south to Guangzhou 廣州. In 881 Huang Chao proclaimed himself emperor of a Qi Dynasty 齊. Emperor Xizong 唐僖宗 (r. 873-888) fled to Chengdu 成都 in Sichuan, like Emperor Xuanzong some 125 years before. Remaining Tang troops under Zheng Tian 鄭畋 and Zhu Wen 朱溫 (later called Zhu Quanzhong 朱全忠) and Türkish auxiliary troops under Li Keyong 李克用 liberated Chang'an and drove the rebels back to the east. In 884 Huang Chao was finally defeated.
The victors of the successful suppression of the Huang Chao rebellions were the warlords that now started to take over the power of the central government, the mightiest among them being the Shatuo Türk Li Keyong, as well as Zhu Quanzhong and Li Maozhen 李茂貞. All of them were military commissioners in absentia and held important posts in the official bureaucracy in the capital, the Southern Court (nanya 南衙) that stood in competency to the inner northern offices (beisi 北司) that were controled by the eunuchs (huanguan 宦官).
The eunuchs had managed to determine the imperial succession since almost a century, and the eunuch Yang Fugong 楊復恭 now installed the young Li Ye 李曄 as emperor in 888 (posthumous title Emperor Zhaozong 唐昭宗, r 888-904). In the struggle for power, Li Maozhen and the eunuchs abducted the emperor, but their clique was defeated in 903 by Zhu Quanzhong who brought back the emperor, executed the eunuchs and transferred the capital to Luoyang, while Chang'an was burnt down. Chang'an was never again used as imperial capital.
In many aspects, these events are similar to the end of the Later Han dynasty 後漢 (25-220 CE). Zhu Quanzhong had assassinated the emperor, installed Li Zhu 李柷 (posthumous title Emperor Ai 唐哀帝, r. 904-907) and murdered the highest Tang officials at Baima station 白馬驛. In 907 he forced Emperor Ai to abdicate and founded his own dynasty, the Liang, by historians called Later Liang 後梁 (907-923), the first of the Five Dynasties 五代 (907-960).