The Li family belonged to the northwest military aristocracy prevalent during the Sui dynasty and claimed to be paternally descended from the Daoist founder, Laozi (whose personal name was Li Dan or Li Er), the Han dynasty General Li Guang, and Western Liang ruler Li Gao. This family was known as the Longxi Li lineage (隴西李氏), which includes the Tang poet Li Bai. The Tang Emperors also had Xianbei maternal ancestry, from Emperor Gaozu of Tang's Xianbei mother, Duchess Dugu.
Li Yuan was Duke of Tang and governor of Taiyuan during the Sui dynasty's collapse, which was caused in part by the Sui failure to conquer the northern part of the Korean peninsula during the Goguryeo–Sui War. He had prestige and military experience, and was a first cousin of Emperor Yang of Sui (their mothers were sisters). Li Yuan rose in rebellion in 617, along with his son and his equally militant daughter Princess Pingyang (d. 623), who raised and commanded her own troops. In winter 617, Li Yuan occupied Chang'an, relegated Emperor Yang to the position of Taishang Huang or retired emperor, and acted as regent to the puppet child-emperor, Yang You. On the news of Emperor Yang's murder by General Yuwen Huaji on June 18, 618, Li Yuan declared himself the emperor of a new dynasty, the Tang.
Li Yuan, known as Emperor Gaozu of Tang, ruled until 626, when he was forcefully deposed by his son Li Shimin, the Prince of Qin. Li Shimin had commanded troops since the age of 18, had prowess with bow and arrow, sword and lance and was known for his effective cavalry charges. Fighting a numerically superior army, he defeated Dou Jiande (573–621) at Luoyang in the Battle of Hulao on May 28, 621. In a violent elimination of royal family due to fear of assassination, Li Shimin ambushed and killed two of his brothers, Li Yuanji (b. 603) and Crown prince Li Jiancheng (b. 589), in the Xuanwu Gate Incident on July 2, 626. Shortly thereafter, his father abdicated in his favor and Li Shimin ascended the throne. He is conventionally known by his temple name Taizong.
Although killing two brothers and deposing his father contradicted the Confucian value of filial piety, Taizong showed himself to be a capable leader who listened to the advice of the wisest members of his council. In 628, Emperor Taizong held a Buddhist memorial service for the casualties of war, and in 629 he had Buddhist monasteries erected at the sites of major battles so that monks could pray for the fallen on both sides of the fight. This was during the Tang campaign against the Eastern Turks, a Turkic Khaganate that was destroyed after the capture of its ruler, Illig Qaghan, by the famed Tang military officer Li Jing (571–649), who later became a Chancellor of the Tang dynasty. With this victory, the Turks accepted Taizong as their khagan, a title rendered as Tian Kehan in addition to his rule as emperor of China under the traditional title "Son of Heaven".
Wu Zetian's usurpation
Although she entered Emperor Gaozong's court as the lowly consort Wu Zhao, Wu Zetian rose to the highest seat of power in 690, establishing the short-lived Wu Zhou. Empress Wu's rise to power was achieved through cruel and calculating tactics: a popular conspiracy theory stated that she killed her own baby girl and blamed it on Gaozong's empress so that the empress would be demoted. Emperor Gaozong suffered a stroke in 655, and Wu began to make many of his court decisions for him, discussing affairs of state with his councilors, who took orders from her while she sat behind a screen. When Empress Wu's eldest son, the crown prince, began to assert his authority and advocate policies opposed by Empress Wu, he suddenly died in 675. Many suspected he was poisoned by Empress Wu. Although the next heir apparent kept a lower profile, in 680 he was accused by Wu of plotting a rebellion and was banished. (He was later obliged to commit suicide.)
In 683, Emperor Gaozong died. He was succeeded by Emperor Zhongzong, his eldest surviving son by Wu. Zhongzong tried to appoint his wife's father as chancellor: after only six weeks on the throne, he was deposed by Empress Wu in favor of his younger brother, 12-year-old Emperor Ruizong. This provoked a group of Tang princes to rebel in 684; Wu's armies suppressed them within two months. She proclaimed the Tianshou era of Wu Zhou on October 16, 690, and three days later demoted Emperor Ruizong to crown prince. He was also forced to give up his father's surname Li in favor of the empress's Wu. She then ruled as China's only empress. A palace coup on February 20, 705, forced her to yield her position on February 22. The next day, her son Zhongzong was restored to power; the Tang was formally restored on March 3. She died soon after. To legitimize her rule, she circulated a document known as the Great Cloud Sutra, which predicted that a reincarnation of the Maitreya Buddha would be a female monarch who would dispel illness, worry, and disaster from the world. She even introduced numerous revised written characters to the written language, which reverted to the originals after her death. Arguably the most important part of her legacy was diminishing the power of the northwest aristocracy, allowing people from other clans and regions of China to become more represented in Chinese politics and government.
Emperor Xuanzong's reign
There were many prominent women at court during and after Wu's reign, including Shangguan Wan'er (664–710), a poet, writer, and trusted official in charge of Wu's private office. In 706 the wife of Emperor Zhongzong of Tang, Empress Wei (d. 710), persuaded her husband to staff government offices with his sister and her daughters, and in 709 requested that he grant women the right to bequeath hereditary privileges to their sons (which before was a male right only). Empress Wei eventually poisoned Zhongzong, whereupon she placed his fifteen-year-old son upon the throne in 710. Two weeks later, Li Longji (the later Emperor Xuanzong) entered the palace with a few followers and slew Empress Wei and her faction. He then installed his father Emperor Ruizong (r. 710–712) on the throne. Just as Emperor Zhongzong was dominated by Empress Wei, so too was Ruizong dominated by Princess Taiping. This was finally ended when Princess Taiping's coup failed in 712 (she later hanged herself in 713) and Emperor Ruizong abdicated to Emperor Xuanzong.
During the 44-year reign of Emperor Xuanzong, the Tang dynasty reached its height, a golden age with low economic inflation and a toned down lifestyle for the imperial court. Seen as a progressive and benevolent ruler, Xuanzong even abolished the death penalty in the year 747; all executions had to be approved beforehand by the emperor himself (these were relatively few, considering that there were only 24 executions in the year 730). Xuanzong bowed to the consensus of his ministers on policy decisions and made efforts to staff government ministries fairly with different political factions. His staunch Confucian chancellor Zhang Jiuling (673–740) worked to reduce deflation and increase the money supply by upholding the use of private coinage, while his aristocratic and technocratic successor Li Linfu (d. 753) favored government monopoly over the issuance of coinage. After 737 most of Xuanzong's confidence rested in his long-standing chancellor Li Linfu, who championed a more aggressive foreign policy employing non-Chinese generals. This policy ultimately created the conditions for a massive rebellion against Xuanzong.
An Lushan Rebellion and catastrophe
The Tang Empire was at its height of power up until the middle of the 8th century, when the An Lushan Rebellion (December 16, 755 – February 17, 763) destroyed the prosperity of the empire. An Lushan was a half-Sogdian, half-Turk Tang commander since 744, had experience fighting the Khitans of Manchuria with a victory in 744, yet most of his campaigns against the Khitans were unsuccessful. He was given great responsibility in Hebei, which allowed him to rebel with an army of more than one hundred thousand troops. After capturing Luoyang, he named himself emperor of a new, but short-lived, Yan state. Despite early victories scored by Tang General Guo Ziyi (697–781), the newly recruited troops of the army at the capital were no match for An Lushan's die-hard frontier veterans, so the court fled Chang'an. While the heir apparent raised troops in Shanxi and Xuanzong fled to Sichuan province, they called upon the help of the Uyghur Khaganate in 756. The Uyghur khan Moyanchur was greatly excited at this prospect, and married his own daughter to the Chinese diplomatic envoy once he arrived, receiving in turn a Chinese princess as his bride. The Uyghurs helped recapture the Tang capital from the rebels, but they refused to leave until the Tang paid them an enormous sum of tribute in silk. Even Abbasid Arabs assisted the Tang in putting down An Lushan's rebellion. The Tibetans took hold of the opportunity and raided many areas under Chinese control, and even after the Tibetan Empire had fallen apart in 842 (and the Uyghurs soon after) the Tang were in no position to reconquer Central Asia after 763. So significant was this loss that half a century later jinshi examination candidates were required to write an essay on the causes of the Tang's decline. Although An Lushan was killed by one of his eunuchs in 757, this time of troubles and widespread insurrection continued until rebel Shi Siming was killed by his own son in 763.
One of the legacies that the Tang government left since 710 was the gradual rise of regional military governors, the jiedushi, who slowly came to challenge the power of the central government. After the An Lushan Rebellion, the autonomous power and authority accumulated by the jiedushi in Hebei went beyond the central government's control. After a series of rebellions between 781 and 784 in today's Hebei, Shandong, Hubei and Henan provinces, the government had to officially acknowledge the jiedushi's hereditary ruling without accreditation. The Tang government relied on these governors and their armies for protection and to suppress locals that would take up arms against the government. In return, the central government would acknowledge the rights of these governors to maintain their army, collect taxes and even to pass on their title to heirs. As time passed, these military governors slowly phased out the prominence of civil officials drafted by exams, and became more autonomous from central authority. The rule of these powerful military governors lasted until 960, when a new civil order under the Song dynasty was established. Also, the abandonment of the equal-field system meant that people could buy and sell land freely. Many poor fell into debt because of this, forced to sell their land to the wealthy, which led to the exponential growth of large estates. With the breakdown of the land allocation system after 755, the central Chinese state barely interfered in agricultural management and acted merely as tax collector for roughly a millennium, save a few instances such as the Song's failed land nationalization during the 13th-century war with the Mongols.
With the central government collapsing in authority over the various regions of the empire, it was recorded in 845 that bandits and river pirates in parties of 100 or more began plundering settlements along the Yangtze River with little resistance. In 858, enormous floods along the Grand Canal inundated vast tracts of land and terrain of the North China Plain, which drowned tens of thousands of people in the process. The Chinese belief in the Mandate of Heaven granted to the ailing Tang was also challenged when natural calamities occurred, forcing many to believe the Heavens were displeased and that the Tang had lost their right to rule. Then in 873 a disastrous harvest shook the foundations of the empire; in some areas only half of all agricultural produce was gathered, and tens of thousands faced famine and starvation. In the earlier period of the Tang, the central government was able to meet crises in the harvest, as it was recorded from 714–719 that the Tang government responded effectively to natural disasters by extending the price-regulation granary system throughout the country. The central government was able then to build a large surplus stock of foods to ward off the rising danger of famine and increased agricultural productivity through land reclamation. In the 9th century, however, the Tang government was nearly helpless in dealing with any calamity.
Rebuilding and recovery
Although these natural calamities and rebellions stained the reputation and hampered the effectiveness of the central government, the early 9th century is nonetheless viewed as a period of recovery for the Tang dynasty. The government's withdrawal from its role in managing the economy had the unintended effect of stimulating trade, as more markets with less bureaucratic restrictions were opened up. By 780, the old grain tax and labor service of the 7th century was replaced by a semiannual tax paid in cash, signifying the shift to a money economy boosted by the merchant class. Cities in the Jiangnan region to the south, such as Yangzhou, Suzhou, and Hangzhou prospered the most economically during the late Tang period. The government monopoly on the production of salt, weakened after the An Shi Rebellion, was placed under the Salt Commission, which became one of the most powerful state agencies, run by capable ministers chosen as specialists. The commission began the practice of selling merchants the rights to buy monopoly salt, which they would then transport and sell in local markets. In 799 salt accounted for over half of the government's revenues. S. A. M. Adshead writes that this salt tax represents "the first time that an indirect tax, rather than tribute, levies on land or people, or profit from state enterprises such as mines, had been the primary resource of a major state." Even after the power of the central government was in decline after the mid 8th century, it was still able to function and give out imperial orders on a massive scale. The Tangshu (Old Book of Tang) compiled in the year 945 recorded that in 828 the Tang government issued a decree that standardized irrigational square-pallet chain pumps in the country:
In the second year of the Taihe reign period , in the second month...a standard model of the chain pump was issued from the palace, and the people of Jingzhao Fu (d footnote: the capital) were ordered by the emperor to make a considerable number of machines, for distribution to the people along the Zheng Bai Canal, for irrigation purposes.|
Painting of the scholar Fu Sheng, by the Tang poet, musician, and painter Wang Wei
The last great ambitious ruler of the Tang dynasty was Emperor Xianzong (r. 805–820), whose reign was aided by the fiscal reforms of the 780s, including a government monopoly on the salt industry. He also had an effective well trained imperial army stationed at the capital led by his court eunuchs; this was the Army of Divine Strategy, numbering 240,000 in strength as recorded in 798. Between the years 806 and 819, Emperor Xianzong conducted seven major military campaigns to quell the rebellious provinces that had claimed autonomy from central authority, managing to subdue all but two of them. Under his reign there was a brief end to the hereditary jiedushi, as Xianzong appointed his own military officers and staffed the regional bureaucracies once again with civil officials. However, Xianzong's successors proved less capable and more interested in the leisure of hunting, feasting, and playing outdoor sports, allowing eunuchs to amass more power as drafted scholar-officials caused strife in the bureaucracy with factional parties. The eunuchs' power became unchallenged after Emperor Wenzong's (r. 826–840) failed plot to have them overthrown; instead the allies of Emperor Wenzong were publicly executed in the West Market of Chang'an, by the eunuchs' command.
However, the Tang did manage to restore at least indirect control over former Tang territories as far west as the Hexi Corridor and Dunhuang in Gansu. In 848 the ethnic Han Chinese general Zhang Yichao (799–872) managed to wrestle control of the region from the Tibetan Empire during its civil war. Shortly afterwards Emperor Xuānzong of Tang (r. 846–859) acknowledged Zhang as the protector (防禦使, Fangyushi) of Sha Prefecture and jiedushi military governor of the new Guiyi Circuit.
End of the dynasty
In addition to natural calamities and jiedushi amassing autonomous control, the Huang Chao Rebellion (874–884) resulted in the sacking of both Chang'an and Luoyang, and took an entire decade to suppress. Although the rebellion was defeated by the Tang, it never recovered from that crucial blow, weakening it for the future military powers to take over. There were also large groups of bandits, in the size of small armies, that ravaged the countryside in the last years of the Tang, who smuggled illicit salt, ambushed merchants and convoys, and even besieged several walled cities.
Zhu Wen, originally a salt smuggler who had served under the rebel Huang, surrendered to Tang forces. By helping to defeat Huang, he was granted a series of rapid military promotions. In 907 the Tang dynasty was ended when Zhu Wen, now a military governor, deposed the last emperor of Tang, Emperor Ai of Tang, and took the throne for himself (known posthumously as Emperor Taizu of Later Liang). He established the Later Liang, which inaugurated the Five Dynasties and Ten Kingdoms period. A year later Zhu Wen had the deposed Emperor Ai poisoned to death.