# History of the Han dynasty

Part of a series on the :
History of China :
Timeline
Dynasties
Historiography :
Prehistoric
Paleolithic
Neolithic (c. 8500 – c. 2000 BCE)
Yellow, Yangtze, and Liao civilization :
Ancient
Xia (c. 2070 – c. 1600 BCE)
Shang (c. 1600 – c. 1046 BCE)
Late Shang (c. 1250 – c. 1046 BCE)
Zhou (c. 1046 – c. 256 BCE)
Western Zhou (1046–771 BCE)
Eastern Zhou (771–256 BCE)
Spring and Autumn (c. 770 – c. 476 BCE)
Warring States (475–221 BCE) :
Imperial
Qin (221–207 BCE)
Han (206 BCE – 220 CE)
Chu–Han Contention (206–202 BCE)
Western Han (202 BCE – 9 CE)
Xin (9–23 CE)
Eastern Han (25–220 CE)
Three Kingdoms (220–280 CE)
Wei, Shu, and Wu
Jin (266–420)
Western Jin (266–316)
Eastern Jin (317–420)
Sixteen Kingdoms (304–439)
Northern and Southern dynasties (420–589)
Sui (581–618)
Tang (618–907)
Wu Zhou (690–705)
Five Dynasties and Ten Kingdoms (907–979)
Song (960–1279)
Northern Song (960–1127)
Southern Song (1127–1279)
Liao (916–1125)
Western Xia (1038–1227)
Jin (1115–1234)
Yuan (1271–1368)
Ming (1368–1644)
Qing (1644–1912) :
Modern
Republic of China (mainland, 1912–1949)
People's Republic of China (1949–present)
Republic of China (Taiwan, 1949–present) :
Related articles
Art history
Economic history
Education history
Legal history
LGBT history
Media history
Music history
Timeline
Military history
Naval history
History of religion in China
Christianity
Judaism
Islam
Science and technology history
Archaeology
Cartography
Discoveries
Inventions
Transport history
Women's history :
vte :
The Han dynasty (201 BCE – 220 CE) was the second imperial dynasty of China. It followed the Qin dynasty, which had unified the Warring States of China by conquest. It was founded by Liu Bang (Emperor Gaozu). The dynasty is divided into two periods: the Western Han (202 BCE – 9 CE) and the Eastern Han (25–220 CE), interrupted briefly by the Xin dynasty (9–23 CE) of Wang Mang. These appellations are derived from the locations of the capital cities Chang'an and Luoyang, respectively. The third and final capital of the dynasty was Xuchang, where the court moved in 196 CE during a period of political turmoil and civil war.
The Han dynasty ruled in an era of Chinese cultural consolidation, political experimentation, relative economic prosperity and maturity, and great technological advances. There was unprecedented territorial expansion and exploration initiated by struggles with non-Chinese peoples, especially the nomadic Xiongnu of the Eurasian Steppe. The Han emperors were initially forced to acknowledge the rival Xiongnu Chanyus as their equals, yet in reality the Han was an inferior partner in a tributary and royal marriage alliance known as heqin.
This agreement was broken when Emperor Wu of Han (r. 141–87 BCE) launched a series of military campaigns which eventually caused the fissure of the Xiongnu Federation and redefined the borders of China. The Han realm was expanded into the Hexi Corridor of modern Gansu, the Tarim Basin of modern Xinjiang, modern Yunnan and Hainan, modern northern Vietnam, modern North Korea, and southern Outer Mongolia. The Han court established trade and tributary relations with rulers as far west as the Arsacids, to whose court at Ctesiphon in Mesopotamia the Han monarchs sent envoys. Buddhism first entered China during the Han, spread by missionaries from Parthia and the Kushan Empire of northern India and Central Asia.
From its beginning, the Han imperial court was threatened by plots of treason and revolt from its subordinate kingdoms, eventually ruled only by royal Liu family members. Initially, the eastern half of the empire was indirectly administered through large semi-autonomous kingdoms which pledged loyalty and a portion of their tax revenues to the Han emperors, who ruled directly over the western half of the empire from Chang'an. Gradual measures were introduced by the imperial court to reduce the size and power of these kingdoms, until a reform of the middle 2nd century BCE abolished their semi-autonomous rule and staffed the kings' courts with central government officials.
Yet much more volatile and consequential for the dynasty was the growing power of both consort clans (of the empress) and the eunuchs of the palace. In 92 CE, the eunuchs entrenched themselves for the first time in the issue of the emperors' succession, causing a series of political crises which culminated in 189 CE with their downfall and slaughter in the palaces of Luoyang. This event triggered an age of civil war as the country became divided by regional warlords vying for power. Finally, in 220 CE, the son of an imperial chancellor and king accepted the abdication of the last Han emperor, who was deemed to have lost the Mandate of Heaven according to Dong Zhongshu's (179–104 BCE) cosmological system that intertwined the fate of the imperial government with Heaven and the natural world. Following the Han, China was split into three states: Cao Wei, Shu Han, and Eastern Wu; these were re-consolidated into one empire by the Jin dynasty (266–420 CE).

## Fall of Qin and Chu–Han contention
### Collapse of Qin

The Zhou dynasty (c. 1056 – c. 256 BCE) had made the state of Qin in Western China as an outpost to breed horses and act as a defensive buffer against nomadic armies of the Rong, Qiang, and Di peoples. After conquering six Warring States (i.e. Han, Zhao, Wei, Chu, Yan, and Qi) by 221 BCE, the King of Qin, Ying Zheng, unified China under one empire divided into 36 centrally-controlled commanderies. With control over much of China proper, he affirmed his enhanced prestige by taking the unprecedented title huangdi, or 'emperor', known thereafter as Qin Shi Huang (i.e. the first emperor of Qin). Han-era historians would accuse his regime of employing ruthless methods to preserve his rule.
Qin Shi Huang died of natural causes in 210 BCE. In 209 BCE, the conscription officers Chen Sheng and Wu Guang, leading 900 conscripts through the rain, failed to meet an arrival deadline; the Twenty-Four Histories claim that the Qin punishment for this delay would have been execution. To avoid this, Chen and Wu started a rebellion against Qin, known as the Dazexiang uprising, but they were thwarted by the Qin general Zhang Han in 208 BCE; both Wu and Chen were subsequently assassinated by their own soldiers. Yet by this point others had rebelled, among them Xiang Yu (d. 202 BCE) and his uncle Xiang Liang, men from a leading family of the Chu aristocracy. They were joined by Liu Bang, a man of peasant origin and supervisor of convicts in Pei County. Mi Xin, grandson of King Huai I of Chu, was declared King Huai II of Chu at his powerbase of Pengcheng (modern Xuzhou) with the support of the Xiangs, while other kingdoms soon formed in opposition to Qin. Despite this, in 208 BCE Xiang Liang was killed in a battle with Zhang Han, who subsequently attacked Zhao Xie the King of Zhao at his capital of Handan, forcing him to flee to Julu, which Zhang put under siege. However, the new kingdoms of Chu, Yan, and Qi came to Zhao's aid; Xiang Yu defeated Zhang at Julu and in 207 BCE forced Zhang to surrender.
While Xiang was occupied at Julu, King Huai II sent Liu Bang to capture the Qin heartland of Guanzhong with an agreement that the first officer to capture this region would become its king. In late 207 BCE, the Qin ruler Ziying, who had claimed the reduced title of King of Qin, had his chief eunuch Zhao Gao killed after Zhao had orchestrated the deaths of Chancellor Li Si in 208 BCE and the second Qin emperor Qin Er Shi in 207. Liu Bang gained Ziying's submission and secured the Qin capital of Xianyang; persuaded by his chief advisor Zhang Liang (d. 189 BCE) not to let his soldiers loot the city, he instead sealed up its treasury.

### Contention with Chu

The Twenty-Four Histories allege that when Xiang Yu arrived at Xianyang two months later in early 206 BCE, he looted it, burned it to the ground, and had Ziying executed. In that year, Xiang Yu offered King Huai II the title of Emperor Yi of Chu and sent him to a remote frontier where he was assassinated; Xiang Yu then assumed the title Hegemon-King of Western Chu (西楚霸王) and became the leader of a confederacy of 18 kingdoms. At the Feast at Hong Gate, Xiang Yu considered having Liu Bang assassinated, but Liu, realising that Xiang was considering killing him, escaped during the middle of the feast. In a slight towards Liu Bang, Xiang Yu carved Guanzhong into three kingdoms with former Qin general Zhang Han and two of his subordinates as kings; Liu Bang was granted the frontier Kingdom of Han in Hanzhong, where he would pose less of a political challenge to Xiang Yu.
In the summer of 206 BCE, Liu Bang heard of Emperor Yi's fate and decided to rally some of the new kingdoms to oppose Xiang Yu, leading to a four-year war known as the Chu–Han Contention. Liu initially made a direct assault against Pengcheng and captured it while Xiang was battling another king who resisted him—Tian Guang (田廣) the King of Qi—but his forces collapsed upon Xiang's return to Pengcheng; he was saved by a storm which delayed the arrival of Chu's troops, although his father Liu Zhijia and wife Lü Zhi were captured by Chu forces. Liu barely escaped another defeat at Xingyang, but Xiang was unable to pursue him because Liu Bang induced Ying Bu, the King of Huainan, to rebel against Xiang. After Liu occupied Chenggao along with a large Qin grain storage, Xiang threatened to kill Liu's father if he did not surrender, but Liu did not give in to Xiang's threats.
With Chenggao and his food supplies lost, and with Liu's general Han Xin (d. 196 BCE) having conquered Zhao and Qi to Chu's north, in 203 BCE, Xiang offered to release Liu's relatives from captivity and split China into political halves: the west would belong to Han and the east to Chu. Although Liu accepted the truce, it was short-lived, and in 202 BCE at Gaixia in modern Anhui, the Han forces forced Xiang to flee from his fortified camp in the early morning with only 800 cavalry, pursued by 5,000 Han cavalry. After several bouts of fighting, Xiang became surrounded at the banks of the Yangzi River, where he committed suicide. Liu took the title of emperor, and is known to posterity as Emperor Gaozu of Han (r. 202–195 BCE).

## Reign of Gaozu
### Consolidation, precedents, and rivals

Emperor Gaozu initially made Luoyang his capital, but then moved it to Chang'an (modern Xi'an, Shaanxi) due to concerns over natural defences and better access to supply routes. Following Qin precedent, Emperor Gaozu adopted the administrative model of a tripartite cabinet (formed by the Three Excellencies) along with nine subordinate ministries (headed by the Nine Ministers). Despite Han statesmen's general condemnation of Qin's harsh methods and Legalist philosophy, the first Han law code compiled by Chancellor Xiao He in 200 BCE seems to have borrowed much from the structure and substance of the Qin code (excavated texts from Shuihudi and Zhangjiashan in modern times have reinforced this suspicion).
From Chang'an, Gaozu ruled directly over 13 commanderies (increased to 16 by his death) in the western portion of the empire. In the eastern portion, he established 10 semi-autonomous kingdoms (Yan, Dai, Zhao, Qi, Liang, Chu, Huai, Wu, Nan, and Changsha) that he bestowed to his most prominent followers to placate them. Due to alleged acts of rebellion and even alliances with the Xiongnu—a northern nomadic people—by 196 BCE Gaozu had replaced nine of them with members of the royal family.
According to Michael Loewe, the administration of each kingdom was "a small-scale replica of the central government, with its chancellor, royal counsellor, and other functionaries." The kingdoms were to transmit census information and a portion of their taxes to the central government. Although they were responsible for maintaining an armed force, kings were not authorised to mobilise troops without explicit permission from the capital.
Wu Rui (吳芮), King of Changsha, was the only remaining king not of the Liu clan. When Wu Rui's great-grandson Wu Zhu (吳著) or Wu Chan (吳產) died heirless in 157 BCE, Changsha was transformed into an imperial commandery and later a Liu family principality. South of Changsha, Gaozu sent Lu Jia (陸賈) as ambassador to the court of Zhao Tuo to acknowledge the latter's sovereignty over Nanyue (Vietnamese: Triệu dynasty; in modern Southwest China and northern Vietnam).

### Xiongnu and Heqin

The Qin general Meng Tian had forced Toumen, the Chanyu of the Xiongnu, out of the Ordos Desert in 215 BCE, but Toumen's son and successor Modu Chanyu built the Xiongnu into a powerful empire by subjugating many other tribes. By the time of Modu's death in 174 BCE, the Xiongnu domains stretched from what is now northeast China and Mongolia to the Altai and Tian Shan mountain ranges in Central Asia. The Chinese feared incursions by the Xiongnu under the guise of trade and were concerned that Han-manufactured iron weapons would fall into Xiongnu hands. Gaozu thus enacted a trade embargo against the Xiongnu. To compensate the Chinese border merchants of the northern kingdoms of Dai and Yan for lost trade, he made them government officials with handsome salaries. Outraged by this embargo, Modu Chanyu planned to attack Han. When the Xiongnu invaded Taiyuan in 200 BCE and were aided by the defector King Xin of Han (韓/韩, not to be confused with the ruling Han 漢 dynasty, or the general Han Xin), Gaozu personally led his forces through the snow to Pingcheng (near modern Datong, Shanxi). In the ensuing Battle of Baideng, Gaozu's forces were heavily surrounded for seven days; running short of supplies, he was forced to flee.
After this defeat, the court adviser Liu Jing (劉敬, originally named Lou Jing 婁敬) convinced the emperor to create a peace treaty and marriage alliance with the Xiongnu Chanyu called the heqin agreement. By this arrangement established in 198 BCE, the Han hoped to modify the Xiongnu's nomadic values with Han luxury goods given as tribute (silks, wine, foodstuffs, etc.) and to make Modu's half-Chinese successor a subordinate to grandfather Gaozu. The exact amounts of annual tribute as promised by Emperor Gaozu given to the Xiongnu in the 2nd century BCE shortly after the defeat are unknown. In 89 BCE, however, Hulugu Chanyu (狐鹿姑; r. 95–85 BCE) requested a renewal of the heqin agreement with the increased amount of annual tribute at 400,000 L (11,350 U.S. bu) of wine, 100,000 L (2,840 U.S. bu) of grain, and 10,000 bales of silk; thus previous amounts would have been less than these figures.
Although the treaty acknowledged both huangdi and chanyu as equals, Han was in fact the inferior partner since it was forced to pay tribute to appease the militarily powerful Xiongnu. Emperor Gaozu was initially set to give his only daughter to Modu, but under the opposition of Empress Lü, Emperor Gaozu made a female relative princess and married her to Modu. Until the 130s BCE, the offering of princess brides and tributary items scarcely satisfied the Xiongnu, who often raided Han's northern frontiers and violated the 162 BCE treaty that established the Great Wall as the border between Han and Xiongnu.

## Empress Dowager Lü's rule
### Emperor Hui

When Ying Bu rebelled in 195 BCE, Emperor Gaozu personally led the troops against Ying and received an arrow wound which allegedly led to his death the following year. His heir apparent Liu Ying took the throne and is posthumously known as Emperor Hui of Han (r. 195–188 BCE). Shortly afterwards Gaozu's widow Lü Zhi, now empress dowager, had Liu Ruyi, a potential claimant to the throne, poisoned and his mother, the Consort Qi, brutally mutilated. When the teenage Emperor Hui discovered the cruel acts committed by his mother, Loewe says that he "did not dare disobey her."
Hui's brief reign saw the completion of the defensive city walls around the capital Chang'an in 190 BCE; these brick and rammed earth walls were originally 12 m (39 ft) tall and formed a rough rectangular ground plan (with some irregularities due to topography); their ruins still stand today. This urban construction project was completed by 150,000 conscript labourers. Emperor Hui's reign saw the repeal of old Qin laws banning certain types of literature and was characterised by a cautious approach to foreign policy, including the renewal of the heqin agreement with the Xiongnu and Han's acknowledgment of the independent sovereignty of the Kings of Donghai and Nanyue.

### Regency and downfall of the Lü clan

Since Emperor Hui did not sire any children with his empress Zhang Yan, after his death in 188 BCE, Lü Zhi, now grand empress dowager and regent, chose his successor from among his sons with other consorts. She first placed Emperor Qianshao of Han (r. 188–184 BCE) on the throne, but then removed him for another puppet ruler Emperor Houshao of Han (r. 184–180 BCE). She not only issued imperial edicts during their reigns, but she also appointed members of her own clan as kings against Emperor Gaozu's explicit prohibition; other clan members became key military officers and civil officials.
The court under Lü Zhi was not only unable to deal with a Xiongnu invasion of Longxi Commandery (in modern Gansu) in which 2,000 Han prisoners were taken, but it also provoked a conflict with Zhao Tuo, King of Nanyue, by imposing a ban on exporting iron and other trade items to his southern kingdom. Proclaiming himself Emperor Wu of Nanyue (南越武帝) in 183 BCE, Zhao Tuo attacked the Han Kingdom of Changsha in 181 BCE. He did not rescind his rival imperial title until the Han ambassador Lu Jia again visited Nanyue's court during the reign of Emperor Wen.
After Empress Dowager Lü's death in 180 BCE, it was alleged that the Lü clan plotted to overthrow the Liu imperial family, and Liu Xiang the King of Qi (Emperor Gaozu's grandson) rose against the Lüs. Before the central government and Qi forces engaged each other, the Lü clan was ousted from power and destroyed by a coup led by the officials Chen Ping and Zhou Bo at Chang'an. Although Liu Xiang had resisted the Lüs, he was passed over to become emperor because he had mobilised troops without permission from the central government and because his mother's family possessed the same ambitious attitude as the Lüs. Consort Bo, the mother of Liu Heng, King of Dai, was considered to possess a noble character, so her son was chosen as successor to the throne; he is known posthumously as Emperor Wen of Han (r. 180–157 BCE).

## Reign of Wen and Jing
### Reforms and policies

During the "Rule of Wen and Jing", the era named after Emperor Wen and his successor Emperor Jing (r. 157–141 BCE), the Han Empire witnessed greater economic and dynastic stability, while the central government assumed more power over the realm. In an attempt to distance itself from the harsh rule of Qin, the court under these rulers abolished legal punishments involving mutilation in 167 BCE, declared eight widespread amnesties between 180 and 141 BCE, and reduced the tax rate on households' agricultural produce from one-fifteenth to one-thirtieth in 168 BCE. It was abolished altogether the following year, but reinstated at the rate of one-thirtieth in 156 BCE.
Government policies were influenced by the proto-Taoist Huang–Lao ideology, a mix of political and cosmological precepts given patronage by Wen's wife Empress Dou (d. 135 BCE), who was empress dowager during Jing's reign and grand empress dowager during the early reign of his successor Emperor Wu (r. 141–87 BCE). Huang-Lao, named after the mythical Yellow Emperor and the 6th-century-BCE philosopher Laozi, viewed the former as the founder of ordered civilisation; this was unlike the Confucians, who gave that role to legendary sage kings Yao and Shun. Han imperial patrons of Huang-Lao sponsored the policy of "nonaction" or wuwei (a central concept of Laozi's Daodejing), which claimed that rulers should interfere as little as possible if administrative and legal systems were to function smoothly. The influence of Huang-Lao doctrines on state affairs became eclipsed with the formal adoption of Confucianism as state ideology during Wu's reign and the later view that Laozi, not the Yellow Emperor, was the originator of Daoist practices.
From 179 to 143 BCE, the number of kingdoms was increased from eleven to twenty-five and the number of commanderies from nineteen to forty. This was not due to a large territorial expansion, but because kingdoms that had rebelled against Han rule or failed to produce an heir were significantly reduced in size or even abolished and carved into new commanderies or smaller kingdoms.

### Rebellion of Seven States

When Liu Xian (劉賢), the heir apparent of Wu, once made an official visit to the capital during Wen's reign, he played a board game called liubo with then crown prince Liu Qi, the future Emperor Jing. During a heated dispute, Liu Qi threw the game board at Liu Xian, killing him. This outraged his father Liu Pi (劉濞), the King of Wu and a nephew of Emperor Gaozu's, who was nonetheless obliged to claim allegiance to Liu Qi once he took the throne.
Still bitter over the death of his son and fearful that he would be targeted in a wave of reduction of kingdom sizes that Emperor Jing carried out under the advice of Imperial Counselor Chao Cuo (d. 154 BCE), the King of Wu led a revolt against Han in 154 BCE as the head of a coalition with six other rebelling kingdoms: Chu, Zhao, Jiaoxi, Jiaodong, Zichuan, and Jinan, which also feared such reductions. However, Han forces commanded by Zhou Yafu were ready and able to put down the revolt, destroying the coalition of seven states against Han. Several kingdoms were abolished (although later reinstated) and others significantly reduced in size. Emperor Jing issued an edict in 145 BCE which outlawed the independent administrative staffs in the kingdoms and abolished all their senior offices except for the chancellor, who was henceforth reduced in status and appointed directly by the central government. His successor Emperor Wu would diminish their power even further by abolishing the kingdoms' tradition of primogeniture and ordering that each king had to divide up his realm between all of his male heirs.

### Relations with the Xiongnu

In 177 BCE, the Xiongnu Wise King of the Right raided the non-Chinese tribes living under Han protection in the northwest (modern Gansu). In 176 BCE, Modu Chanyu sent a letter to Emperor Wen informing him that the Wise King, allegedly insulted by Han officials, acted without the Chanyu's permission and so he punished the Wise King by forcing him to conduct a military campaign against the nomadic Yuezhi. Yet this event was merely part of a larger effort to recruit nomadic tribes north of Han China, during which the bulk of the Yuezhi were expelled from the Hexi Corridor (fleeing west into Central Asia) and the sedentary state of Loulan in the Lop Nur salt marsh, the nomadic Wusun of the Tian Shan range, and twenty-six other states east of Samarkand (Sogdia) were subjugated to Xiongnu hegemony. Modu Chanyu's implied threat that he would invade China if the heqin agreement was not renewed sparked a debate in Chang'an; although officials such as Chao Cuo and Jia Yi (d. 169 BCE) wanted to reject the heqin policy, Emperor Wen favoured renewal of the agreement. Modu Chanyu died before the Han tribute reached him, but his successor Laoshang Chanyu (174–160 BCE) renewed the heqin agreement and negotiated the opening of border markets. Lifting the ban on trade significantly reduced the frequency and size of Xiongnu raids, which had necessitated tens of thousands of Han troops to be stationed at the border. However, Laoshang Chanyu and his successor Junchen Chanyu (r. 160–126 BCE) continued to violate Han's territorial sovereignty by making incursions despite the treaty. While Laoshang Chanyu continued the conquest of his father by driving the Yuezhi into the Ili River valley, the Han quietly built up its strength in cavalry forces to later challenge the Xiongnu.

## Reign of Wu
### Confucianism and government recruitment

Although Emperor Gaozu did not ascribe to the philosophy and system of ethics attributed to Confucius (fl. 6th century BCE), he did enlist the aid of Confucians such as Lu Jia and Shusun Tong; in 196 BCE he established the first Han regulation for recruiting men of merit into government service, which Robert P. Kramer calls the "first major impulse toward the famous examination system." Emperors Wen and Jing appointed Confucian academicians to court, yet not all academicians at their courts specialised in what would later become orthodox Confucian texts. For several years after Liu Che took the throne in 141 BCE (known posthumously as Emperor Wu), the Grand Empress Dowager Dou continued to dominate the court, and she forced the Emperor to ask her questions before making a political decision. It was not convenient for Emperor Wu to disobey his grandmother and she did not accept any policy which she found unfavorable or contradicted Huang-Lao ideology. After her death in 135 BCE, a major shift occurred in Chinese political history.
After Emperor Wu called for the submission of memorial essays on how to improve the government, he favoured that of the official Dong Zhongshu (179–104 BCE), a philosopher whom Kramers calls the first Confucian "theologian". Dong's synthesis fused together the ethical ideas of Confucius with the cosmological beliefs in yin and yang and Five Elements or Wuxing by fitting them into the same holistic, universal system which governed heaven, earth, and the world of man. Moreover, it justified the imperial system of government by providing it its place within the greater cosmos. Reflecting the ideas of Dong Zhongshu, Emperor Wu issued an edict in 136 BCE that abolished academic chairs other than those focused on the Confucian Five Classics. In 124 BCE Emperor Wu established the Imperial University, at which the academicians taught 50 students; this was the incipient beginning of the civil service examination system refined in later dynasties. Although sons and relatives of officials were often privileged with nominations to office, those who did not come from a family of officials were not barred from entry into the bureaucracy. Rather, education in the Five Classics became the paramount prerequisite for gaining office; as a result, the Imperial University was expanded dramatically by the 2nd century CE when it accommodated 30,000 students. With Cai Lun's (d. 121 CE) invention of the papermaking process in 105 CE, the spread of paper as a cheap writing medium from the Eastern Han period onwards increased the supply of books and hence the number of those who could be educated for civil service.

### War against the Xiongnu

The death of Empress Dou also marked a significant shift in foreign policy. To address the Xiongnu threat and renewal of the heqin agreement, Emperor Wu called a court conference into session in 135 BCE where two factions of leading ministers debated the merits and faults of the current policy; Emperor Wu followed the majority consensus of his ministers that peace should be maintained. A year later, while the Xiongnu were busy raiding the northern border and waiting for Han's response, Wu had another court conference assembled. The faction supporting war against the Xiongnu was able to sway the majority opinion by making a compromise for those worried about stretching financial resources on an indefinite campaign: in a limited engagement along the border near Mayi, Han forces would lure Junchen Chanyu over with gifts and promises of defections to quickly eliminate him and cause political chaos for the Xiongnu. When the Mayi trap failed in 133 BCE (Junchen Chanyu realised he was about to fall into a trap and fled back north), the era of heqin-style appeasement was broken and the Han court resolved to engage in full-scale war.
Leading campaigns involving tens of thousands of troops, in 127 BCE the Han general Wei Qing (d. 106 BCE) recaptured the Ordos Desert region from the Xiongnu and in 121 BCE Huo Qubing (d. 117 BCE) expelled them from the Qilian Mountains, gaining the surrender of many Xiongnu aristocrats. At the Battle of Mobei in 119 BCE, generals Wei and Huo led the campaign to the Khangai Mountains where they forced the chanyu to flee north of the Gobi Desert. The maintenance of 300,000 horses by government slaves in thirty-six different pasture lands was not enough to satisfy the cavalry and baggage trains needed for these campaigns, so the government offered exemption from military and corvée labour for up to three male members of each household who presented a privately bred horse to the government.

### Expansion and colonisation

After Xiongnu's King Hunye surrendered to Huo Qubing in 121 BCE, the Han acquired a territory stretching from the Hexi Corridor to Lop Nur, thus cutting the Xiongnu off from their Qiang allies. New commanderies were established in the Ordos as well as four in the Hexi Corridor—Jiuquan, Zhangyi, Dunhuang, and Wuwei—which were populated with Han settlers after a major Qiang-Xiongnu allied force was repelled from the region in 111 BCE. By 119 BCE, Han forces established their first garrison outposts in the Juyan Lake Basin of Inner Mongolia, with larger settlements built there after 110 BCE. Roughly 40% of the settlers at Juyan came from the Guandong region of modern Henan, western Shandong, southern Shanxi, southern Hebei, northwestern Jiangsu, and northwestern Anhui. After Hunye's surrender, the Han court moved 725,000 people from the Guandong region to populate the Xinqinzhong (新秦中) region south of the bend of the Yellow River. In all, Emperor Wu's forces conquered roughly 4.4 million km$^2$ (1.7 million mi$^2$) of new land, by far the largest territorial expansion in Chinese history. Self-sustaining agricultural garrisons were established in these frontier outposts to support military campaigns as well as secure trade routes leading into Central Asia, the eastern terminus of the Silk Road. The Han-era Great Wall was extended as far west as Dunhuang and sections of it still stand today in Gansu, including thirty Han beacon towers and two fortified castles.

### Exploration, foreign trade, war and diplomacy

Starting in 139 BCE, the Han diplomat Zhang Qian travelled west in an unsuccessful attempt to secure an alliance with the Da Yuezhi (who were evicted from Gansu by the Xiongnu in 177 BCE); however, Zhang's travels revealed entire countries which the Chinese were unaware of, the remnants of the conquests of Alexander the Great (r. 336–323 BCE). When Zhang returned to China in 125 BCE, he reported on his visits to Dayuan (Fergana), Kangju (Sogdiana), and Daxia (Bactria, formerly the Greco-Bactrian Kingdom which was subjugated by the Da Yuezhi). Zhang described Dayuan and Daxia as agricultural and urban countries like China, and although he did not venture there, described Shendu (the Indus River valley of northern India) and Anxi (Arsacid territories) further west. Envoys sent to these states returned with foreign delegations and lucrative trade caravans; yet even before this, Zhang noted that these countries were importing Chinese silk. After interrogating merchants, Zhang also discovered a southwestern trade route leading through Burma and on to India. The earliest known Roman glassware found in China (but manufactured in the Roman Empire) is a glass bowl found in a Guangzhou tomb dating to the early 1st century BCE and perhaps came from a maritime route passing through the South China Sea. Likewise, imported Chinese silk attire became popular in the Roman Republic by the time of Julius Caesar (100–44 BCE).
After the heqin agreement broke down, the Xiongnu were forced to extract more crafts and agricultural foodstuffs from the subjugated Tarim Basin urban centers. From 115 to 60 BCE the Han and Xiongnu battled for control and influence over these states, with the Han gaining, from 108 to 101 BCE tributary submission of Loulan, Turpan, Bügür, Dayuan (Fergana), and Kangju (Sogdiana). The farthest-reaching and most expensive invasion was Li Guangli's four-year campaign against Fergana in the Syr Darya and Amu Darya valleys (modern Uzbekistan and Kyrgyzstan). Historian Laszlo Torday (1997) asserts that Fergana threatened to cut off Han's access to the Silk Road, yet historian Sima Qian (d. 86 BCE) downplayed this threat by asserting that Li's mission was really a means to punish Dayuan for not providing tribute of prized Central Asian stallions.
To the south, Emperor Wu assisted King Zhao Mo in fending off an attack by Minyue (in modern Fujian) in 135 BCE. After a pro-Han faction was overthrown at the court of Nanyue, Han naval forces conquered Nanyue in 111 BCE during the Han–Nanyue War, bringing areas of modern Guangdong, Guangxi, Hainan Island, and northern Vietnam under Han control. Emperor Wu also launched an invasion into the Dian Kingdom of Yunnan in 109 BCE, subjugating its king as a tributary vassal, while later Dian rebellions in 86 BCE and 83 BCE, 14 CE (during Wang Mang's rule), and 42–45 CE were quelled by Han forces. Wu sent an expedition into what is now North Korea in 128 BCE, but this was abandoned two years later. In 108 BCE, another expedition against Gojoseon in northern Korea established four commanderies there, only two of which (i.e. Xuantu Commandery and Lelang Commandery) remained after 82 BCE. Although there was some violent resistance in 108 BCE and irregular raids by Goguryeo and Buyeo afterwards, Chinese settlers conducted peaceful trade relations with native Koreans who lived largely independent of (but were culturally influenced by) the sparse Han settlements.

### Economic reforms

To fund his prolonged military campaigns and colonisation efforts, Emperor Wu turned away from the "nonaction" policy of earlier reigns by having the central government commandeer the private industries and trades of salt mining and iron manufacturing by 117 BCE. Another government monopoly over liquor was established in 98 BCE, but the majority consensus at a court conference in 81 BCE led to the breaking up of this monopoly. The mathematician and official Sang Hongyang (d. 80 BCE), who later became Imperial Counselor and one of many former merchants drafted into the government to help administer these monopolies, was responsible for the 'equable transportation' system that eliminated price variation over time from place to place. This was a government means to interfere in the profitable grain trade by eliminating speculation (since the government stocked up on grain when cheap and sold it to the public at a low price when private merchants demanded higher ones). This along with the monopolies were criticised even during Wu's reign as bringing unnecessary hardships for merchants' profits and farmers forced to rely on poor-quality government-made goods and services; the monopolies and equable transportation did not last into the Eastern Han Era (25–220 CE).
During Emperor Wu's reign, the poll tax for each minor aged three to fourteen was raised from 20 to 23 coins; the rate for adults remained at 120. New taxes exacted on market transactions, wheeled vehicles, and properties were meant to bolster the growing military budget. In 119 BCE a new bronze coin weighing five shu (3.2 g/0.11 oz)—replacing the four shu coin—was issued by the government (remaining the standard coin of China until the Tang dynasty), followed by a ban on private minting in 113 BCE. Earlier attempts to ban private minting took place in 186 and 144 BCE, but Wu's monopoly over the issue of coinage remained in place throughout the Han (although its stewardship changed hands between different government agencies). From 118 BCE to 5 CE, the Han government minted 28 billion coins, an average of 220 million a year.

## Latter half of Western Han
### Regency of Huo Guang

Emperor Wu's first wife, Empress Chen Jiao, was deposed in 130 BCE after allegations that she attempted witchcraft to help her produce a male heir. In 91 BCE, similar allegations were made against Emperor Wu's Crown Prince Liu Ju, the son of his second wife Empress Wei Zifu. Liu Ju, in fear of Emperor Wu believing the false allegations, began a rebellion in Chang'an which lasted for five days, while Emperor Wu was away at his quiet summer retreat of Ganquan (甘泉; in modern Shaanxi). After Liu Ju's defeat, he and his mother committed suicide.
Eventually, due to his good reputation, Huo Qubing's half-brother Huo Guang was entrusted by Wu to form a triumvirate regency alongside ethnically Xiongnu Jin Midi (d. 86 BCE) and Shangguan Jie (d. 80 BCE) over the court of his successor, the child Liu Fuling, known posthumously as Emperor Zhao of Han (r. 87–74 BCE). Jin Midi died a year later and by 80 BCE Shangguan Jie and Imperial Counselor Sang Hongyang were executed when they were accused of supporting Emperor Zhao's older brother Liu Dan (劉旦) the King of Yan as emperor; this gave Huo unrivaled power. However, he did not abuse his power in the eyes of the Confucian establishment and gained popularity for reducing Emperor Wu's taxes.
Emperor Zhao died in 74 BCE without a successor, while the one chosen to replace him on 18 July, his nephew Prince He of Changyi, was removed on 14 August after displaying a lack of character or capacity to rule. Prince He's removal was secured with a memorial signed by all the leading ministers and submitted to Empress Dowager Shangguan for approval. Liu Bingyi (Liu Ju's grandson) was named Emperor Xuan of Han (r. 74–49 BCE) on 10 September. Huo Guang remained in power as regent over Emperor Xuan until he died of natural causes in 68 BCE. Yet in 66 BCE the Huo clan was charged with conspiracy against the throne and eliminated. This was the culmination of Emperor Xuan's revenge after Huo Guang's wife had poisoned his beloved Empress Xu Pingjun in 71 BCE only to have her replaced by Huo Guang's daughter Empress Huo Chengjun (the latter was deposed in September 66 BCE). Liu Shi, son of Empress Xu, succeeded his father as Emperor Yuan of Han (r. 49–33 BCE).

### Reforms and frugality

During Emperor Wu's reign and Huo Guang's regency, the dominant political faction was the Modernist Party. This party favoured greater government intervention in the private economy with government monopolies over salt and iron, higher taxes exacted on private business, and price controls which were used to fund an aggressive foreign policy of territorial expansion; they also followed the Qin dynasty approach to discipline by meting out more punishments for faults and less rewards for service. After Huo Guang's regency, the Reformist Party gained more leverage over state affairs and policy decisions. This party favoured the abolishment of government monopolies, limited government intervention in the private economy, a moderate foreign policy, limited colonisation efforts, frugal budget reform, and a return to the Zhou dynasty ideal of granting more rewards for service to display the dynasty's magnanimity. This party's influence can be seen in the abolition of the central government's salt and iron monopolies in 44 BCE, yet these were reinstated in 41 BCE, only to be abolished again during the 1st century CE and transferred to local administrations and private entrepreneurship. By 66 BCE the Reformists had many of the lavish spectacles, games, and entertainments installed by Emperor Wu to impress foreign dignitaries cancelled on the grounds that they were excessive and ostentatious.
Spurred by alleged signs from Heaven warning the ruler of his incompetence, a total of eighteen general amnesties were granted during the combined reigns of Emperor Yuan (Liu Shi) and Emperor Cheng of Han (r. 33–7 BCE, Liu Ao 劉驁). Emperor Yuan reduced the severity of punishment for several crimes, and the length of judicial procedures was reduced in 34 BCE since they were disrupting the lives of commoners. While the Modernists had accepted sums of cash from criminals to have their sentences commuted or even dropped, the Reformists reversed this policy since it favoured the wealthy over the poor and was not an effective deterrent against crime.
Emperor Cheng made major reforms to state-sponsored religion. The Qin dynasty had worshipped four main legendary deities, with another added by Emperor Gaozu in 205 BCE; these were the Five Powers, or Wudi. In 31 BCE Emperor Cheng, in an effort to gain Heaven's favour and bless him with a male heir, halted all ceremonies dedicated to the Five Powers and replaced them with ceremonies for the supreme god Shangdi, who the kings of Zhou had worshipped.

### Foreign relations and war

The first half of the 1st century BCE witnessed several succession crises for the Xiongnu leadership, allowing Han to further cement its control over the Western Regions. The Han general Fu Jiezi assassinated the pro-Xiongnu King of Loulan in 77 BCE. The Han formed a coalition with the Wusun, Dingling, and Wuhuan, and the coalition forces inflicted a major defeat against the Xiongnu in 72 BCE. The Han regained its influence over the Turpan Depression after defeating the Xiongnu at the Battle of Jushi in 67 BCE. In 65 BCE Han was able to install a new King of Kucha (a state north of the Taklamakan Desert) who would be agreeable to Han interests in the region. The office of the Protectorate of the Western Regions, first given to Zheng Ji (d. 49 BCE), was established in 60 BCE to supervise colonial activities and conduct relations with the small kingdoms of the Tarim Basin.
After Zhizhi Chanyu (r. 56–36 BCE) had inflicted a serious defeat against his rival brother and royal contender Huhanye Chanyu (呼韓邪; r. 58–31 BCE), Huhanye and his supporters debated whether to request Han aid and become a Han vassal. He decided to do so in 52 BCE. Huhanye sent his son as a hostage to Han and personally paid homage to Emperor Xuan during the 51 BCE Chinese New Year celebration. Under the advocacy of the Reformists, Huhanye was seated as a distinguished guest of honour and rich rewards of 5 kg (11 lb) of gold, 200,000 cash coins, 77 suits of clothes, 8,000 bales of silk fabric, 1,500 kg (3,300 lb) f silk floss, and 15 horses, in addition to 680,000 L (150,000 imp gal; 180,000 US gal) of grain sent to him when he returned home.
Huhanye Chanyu and his successors were encouraged to pay further trips of homage to the Han court due to the increasing amount of gifts showered on them after each visit; this was a cause for complaint by some ministers in 3 BCE, yet the financial consequence of pampering their vassal was deemed superior to the heqin agreement. Zhizhi Chanyu initially attempted to send hostages and tribute to the Han court in hopes of ending the Han support of Huhanye, but eventually turned against Han. Subsequently, the Han general Chen Tang and Protector General Gan Yanshou (甘延壽; 甘延寿), acting without explicit permission from the Han court, killed Zhizhi at his capital of Shanyu City (in modern Taraz, Kazakhstan) in 36 BCE. The Reformist Han court, reluctant to award independent missions let alone foreign interventionism, gave Chen and Gan only modest rewards. Despite the show of favour, Huhanye was not given a Han princess; instead, he was given the Lady Wang Zhaojun, one of the Four Beauties of ancient China. This marked a departure from the earlier heqin agreement, where a Chinese princess was handed over to the Chanyu as his bride.

## Wang Mang's usurpation
### Wang Mang seizes control

The long life of Empress Wang Zhengjun (71 BCE – 13 CE), wife of Emperor Yuan and mother to Emperor Cheng, ensured that her male relatives would be appointed one after another to the role of regent, officially known as Commander-in-Chief. Emperor Cheng, who was more interested in cockfighting and chasing after beautiful women than administering the empire, left much of the affairs of state to his relatives of the Wang clan. On 28 November 8 BCE Wang Mang (45 BCE – 23 CE), a nephew of Empress Dowager Wang, became the new General-in-Chief. However, when Emperor Ai of Han (r. 7–1 BCE, Liu Xin) took the throne, his grandmother Consort Fu (Emperor Yuan's concubine) became the leading figure in the palace and forced Wang Mang to resign on 27 August 7 BCE, followed by his forced departure from the capital to his marquessate in 5 BCE.
Due to pressure from Wang's supporters, Emperor Ai invited Wang Mang back to the capital in 2 BCE. A year later Emperor Ai died of illness without a son. Wang Mang was reinstated as regent over Emperor Ping of Han (r. 1 BCE – 6 CE, Liu Jizi), a first cousin of the former emperor. Although Wang had married his daughter to Emperor Ping, the latter was still a child when he died in 6 CE. In July of that year, Grand Empress Dowager Wang confirmed Wang Mang as acting emperor (jiahuangdi 假皇帝) and the child Liu Ying as his heir to succeed him, despite the fact that a Liu family marquess had revolted against Wang a month earlier, followed by others who were outraged that he was assuming greater power than the imperial Liu family. These rebellions were quelled and Wang Mang promised to hand over power to Liu Ying when he reached his majority. Despite promises to relinquish power, Wang initiated a propaganda campaign to show that Heaven was sending signals that it was time for Han's rule to end. On 10 January 9 CE he announced that Han had run its course and accepted the requests that he proclaim himself emperor of the Xin dynasty (9–23 CE).

### Traditionalist reforms

Wang Mang had a grand vision to restore China to a fabled golden age achieved in the early Zhou dynasty, the era which Confucius had idealised. He attempted sweeping reforms, including the outlawing of slavery and institution of the King's Fields system in 9 CE, nationalising land ownership and allotting a standard amount of land to each family. Slavery was reestablished and the land reform regime was cancelled in 12 CE due to widespread protest.
The historian Ban Gu (32–92 CE) wrote that Wang's reforms led to his downfall, yet aside from slavery and land reform, historian Hans Bielenstein points out that most of Wang's reforms were in line with earlier Han policies. Although his new denominations of currency introduced in 7, 9, 10, and 14 CE debased the value of coinage, earlier introductions of lighter-weight currencies resulted in economic damage as well. Wang renamed all the commanderies of the empire as well as bureaucratic titles, yet there were precedents for this as well. The government monopolies were rescinded in 22 CE because they could no longer be enforced during a large-scale rebellion against him (spurred by massive flooding of the Yellow River).

### Foreign relations under Wang

The half-Chinese, half-Xiongnu noble Yituzhiyashi (伊屠智牙師), son of Huhanye Chanyu and Wang Zhaojun, became a vocal partisan for Han China within the Xiongnu realm; Bielenstein claims that this led conservative Xiongnu nobles to anticipate a break in the alliance with Han. The moment came when Wang Mang assumed the throne and demoted the Chanyu to a lesser rank; this became a pretext for war. During the winter of 10–11 CE, Wang amassed 300,000 troops along the northern border of Han China, a show of force which led the Xiongnu to back down. Yet when raiding continued, Wang Mang had the princely Xiongnu hostage held by Han authorities executed. Diplomatic relations were repaired when Xian (咸; r. 13–18 CE) became the chanyu, only to be soiled again when Huduershi Chanyu (呼都而尸; r. 18–46 CE) took the throne and raided Han's borders in 19 CE.
The Tarim Basin kingdom of Yanqi (Karasahr, located east of Kucha, west of Turpan) rebelled against Xin authority in 13 CE, killing Han's Protector General Dan Qin (但欽). Wang Mang sent a force to retaliate against Karasahr in 16 CE, quelling their resistance and ensuring that the region would remain under Chinese control until the widespread rebellion against Wang Mang toppled his rule in 23 CE. Wang also extended Chinese influence over Tibetan tribes in the Kokonor region and fended off an attack in 12 CE by Goguryeo (an early Korean state located around the Yalu River) in the Korean peninsula. However, as the widespread rebellion in China mounted from 20 to 23 CE, the Koreans raided Lelang Commandery and Han did not reassert itself in the region until 30 CE.

## Restoration of the Han
### Natural disaster and civil war

Before 3 CE, the course of the Yellow River had emptied into the Bohai Sea at Tianjin, but the gradual buildup of silt in its riverbed—which raised the water level each year—overpowered the dikes built to prevent flooding and the river split in two, with one arm flowing south of the Shandong Peninsula and into the East China Sea. A second flood in 11 CE changed the course of the northern branch of the river so that it emptied slightly north of the Shandong Peninsula, yet far south of Tianjin. With much of the southern North China Plain inundated following the creation of the Yellow River's southern branch, thousands of starving peasants who were displaced from their homes formed groups of bandits and rebels, most notably the Red Eyebrows. Wang Mang's armies tried to quell these rebellions in 18 and 22 CE but failed.
Liu Yan (d. 23 CE), a descendant of Emperor Jing, led a group of rebelling gentry groups from Nanyang who had Yan's third cousin Liu Xuan (劉玄) accept the title Gengshi Emperor (r. 23–25) on 11 March 23 CE. Liu Xiu, a brother of Liu Yan and future Emperor Guangwu of Han (r. 25–57 CE), distinguished himself at the Battle of Kunyang on 7 July 23 CE when he relieved a city besieged by Wang Mang's forces and turned the tide of the war. Soon afterwards, Gengshi Emperor had Liu Yan executed on grounds of treason and Liu Xiu, fearing for his life, resigned from office as Minister of Ceremonies and avoided public mourning for his brother; for this, the emperor gave Liu Xiu a marquessate and a promotion as general.
Gengshi's forces then targeted Chang'an, but a local insurgency broke out in the capital, sacking the city on 4 October. From 4–6 October Wang Mang made a last stand at the Weiyang Palace only to be killed and decapitated; his head was sent to Gengshi's headquarters at Wan (i.e., Nanyang) before Gengshi's armies even reached Chang'an on 9 October. Gengshi Emperor settled Luoyang as his new capital where he invited Red Eyebrows leader Fan Chong (樊崇) to stay, yet Gengshi granted him only honorary titles, so Fan decided to flee once his men began to desert him. Gengshi moved the capital back to Chang'an in 24 CE, yet in the following year the Red Eyebrows defeated his forces, appointed their own puppet ruler Liu Penzi, entered Chang'an and captured the fleeing Gengshi who they demoted as King of Changsha before killing him.

### Reconsolidation under Guangwu

While acting as a commissioner under the Gengshi Emperor, Liu Xiu gathered a significant following after putting down a local rebellion (in what is now Hebei). He claimed the Han throne himself on 5 August 25 CE and occupied Luoyang as his capital on 27 November. Before he would eventually unify the empire, there were 11 others who claimed the title of emperor. With the efforts of his officers Deng Yu and Feng Yi, Liu Xiu, now emperor Guangwu, forced the wandering Red Eyebrows to surrender on 15 March 27 CE, resettling them at Luoyang, yet had their leader Fan Chong executed when a plot of rebellion was revealed.
From 26 to 30 CE, Guangwu defeated various warlords and conquered the Central Plain and Shandong Peninsula in the east. Allying with the warlord Dou Rong (竇融) of the distant Hexi Corridor in 29 CE, Guangwu nearly defeated the Gansu warlord Wei Xiao (隗囂; 隗嚣) in 32 CE, seizing Wei's domain in 33 CE. The last adversary standing was Gongsun Shu, whose "Chengjia" regime was based at Chengdu in modern Sichuan. Although Guangwu's forces successfully burned down Gongsun's fortified pontoon bridge stretching across the Yangtze, Guangwu's commanding general Cen Peng (岑彭) was killed in 35 CE by an assassin sent by Gongsun Shu. Nevertheless, Han General Wu Han (d. 44 CE) resumed Cen's campaign along the Yangzi and Min rivers and destroyed Gongsun's forces by December 36 CE.
The restoration of the Han depended heavily on the support of the powerful landed gentry of the Central Plains, who were disenchanted with Wang Mang; therefore the Eastern Han became increasingly beholden to them. This helped to motivate the shift of the capital to Luoyang in the Central Plains.
Since Chang'an is located west of Luoyang, the names Western Han (202 BCE – 9 CE) and Eastern Han (25–220 CE) are accepted by historians. Luoyang's 10 m (33 ft) tall eastern, western, and northern walls still stand today, although the southern wall was destroyed when the Luo River changed its course. Within its walls it had two prominent palaces, both of which existed during Western Han, but were expanded by Guangwu and his successors. While Eastern Han Luoyang is estimated to have held roughly 500,000 inhabitants, the first known census data for the whole of China, dated 2 CE, recorded a population of nearly 58 million. Comparing this to the census of 140 CE (when the total population was registered at roughly 48 million), there was a significant migratory shift of up to 10 million people from northern to southern China during Eastern Han, largely because of natural disasters and wars with nomadic groups in the north. Population size fluctuated according to periodically updated Eastern Han censuses, but historian Sadao Nishijima notes that this does not reflect a dramatic loss of life, but rather government inability at times to register the entire populace.

### Policies under Guangwu, Ming, Zhang, and He

Scrapping Wang Mang's denominations of currency, Emperor Guangwu reintroduced Western Han's standard five shu coin in 40 CE. Making up for lost revenue after the salt and iron monopolies were cancelled, private manufacturers were heavily taxed while the government purchased its armies' swords and shields from private businesses. In 31 CE he allowed peasants to pay a military substitution tax to avoid conscription into the armed forces for a year of training and year of service; instead he built a volunteer force which lasted throughout Eastern Han. He also allowed peasants to avoid the one-month corvée duty with a commutable tax as hired labour became more popular. Wang Mang had demoted all Han marquesses to commoner status, yet Guangwu made an effort from 27 CE onwards to find their relatives and restore abolished marquessates.
Emperor Ming of Han (r. 57–75 CE, Liu Yang) re-established the Office for Price Adjustment and Stabilization and the price stabilisation system where the government bought grain when cheap and sold it to the public when private commercial prices were high due to limited stocks. However, he cancelled the price stabilisation scheme in 68 CE when he became convinced that government hoarding of grain only made wealthy merchants even richer. With the renewed economic prosperity brought about by his father's reign, Emperor Ming addressed the flooding of the Yellow River by repairing various dams and canals. On 8 April 70 CE, an edict boasted that the southern branch of the Yellow River emptying south of the Shandong Peninsula was finally cut off by Han engineering. A patron of scholarship, Emperor Ming also established a school for young nobles aside from the Imperial University.
Emperor Zhang of Han (r. 75–88 CE, Liu Da) faced an agrarian crisis when a cattle epidemic broke out in 76 CE. In addition to providing disaster relief, Zhang also made reforms to legal procedures and lightened existing punishments with the bastinado, since he believed that this would restore the seasonal balance of yin and yang and cure the epidemic. To further display his benevolence, in 78 CE he ceased the corvée work on canal works of the Hutuo River running through the Taihang Mountains, believing it was causing too much hardship for the people; in 85 CE he granted a three-year poll tax exemption for any woman who gave birth and exempted their husbands for a year. Unlike other Eastern Han rulers who sponsored the New Texts tradition of the Confucian Five Classics, Zhang was a patron of the Old Texts tradition and held scholarly debates on the validity of the schools. Rafe de Crespigny writes that the major reform of the Eastern Han period was Zhang's reintroduction in 85 CE of an amended Sifen calendar, replacing Emperor Wu's Taichu calendar of 104 BCE which had become inaccurate over two centuries (the former measured the tropical year at 365.25 days like the Julian Calendar, while the latter measured the tropical year at 365$^{385}$⁄$_{1539}$ days and the lunar month at 29$^{43}$⁄$_{81}$ days).
Emperor He of Han (r. 88–105 CE, Liu Zhao) was tolerant of both New Text and Old Text traditions, though orthodox studies were in decline and works sceptical of New Texts, such as Wang Chong's (27 – c. 100 CE) Lunheng, disillusioned the scholarly community with that tradition. He also showed an interest in history when he commissioned the Lady Ban Zhao (45–116 CE) to use the imperial archives to complete the Book of Han, the work of her deceased father and brother. This set an important precedent of imperial control over the recording of history and thus was unlike Sima Qian's far more independent work, the Records of the Grand Historian (109–91 BCE). When plagues of locusts, floods, and earthquakes disrupted the lives of commoners, Emperor He's relief policies were to cut taxes, open granaries, provide government loans, forgive private debts, and resettle people away from disaster areas. Believing that a severe drought in 94 CE was the cosmological result of injustice in the legal system, Emperor He personally inspected prisons. When he found that some had false charges levelled against them, he sent the Prefect of Luoyang to prison; rain allegedly came soon afterwards.

### Foreign relations and split of the Xiongnu realm

The Vietnamese Trưng Sisters led an uprising in the Red River Delta of Jiaozhi Commandery in 40 CE. Guangwu sent the elderly general Ma Yuan (c. 14 BCE – 49 CE), who defeated them in 42–43 CE. The sisters' native Dong Son drums were melted down and recast into a large bronze horse statue presented to Guangwu at Luoyang.
Meanwhile, Huduershi Chanyu was succeeded by his son Punu (蒲奴) in 46 CE, thus breaking Huhanye's orders that only a Xiongnu ruler's brother was a valid successor; Huduershi's nephew Bi (比) was outraged and in 48 CE was proclaimed a rival Chanyu. This split created the Northern Xiongnu and Southern Xiongnu, and like Huhanye before him, Bi turned to the Han for aid in 50 CE. When Bi came to pay homage to the Han court, he was given 10,000 bales of silk fabrics, 2,500 kg (5,500 lb) of silk, 500,000 L (14,000 U.S. bu) of rice, and 36,000 head of cattle. Unlike in Huhanye's time, however, the Southern Xiongnu were overseen by a Han Prefect who not only acted as an arbiter in Xiongnu legal cases, but also monitored the movements of the Chanyu and his followers who were settled in Han's northern commanderies in Shanxi, Gansu, and Inner Mongolia. Northern Xiongnu attempts to enter Han's tributary system were rejected.
Following Xin's loss of the Western Territories, the Kingdom of Yarkand looked after the Chinese officials and families stranded in the Tarim Basin and fought the Xiongnu for control over it. Emperor Guangwu, preoccupied with civil wars in China, simply granted King Kang of Yarkand an official title in 29 CE and in 41 CE made his successor King Xian a Protector General (later reduced to the honorary title of "Great General of Han"). Yarkand overtaxed its subjects of Khotan, Turpan, Kucha, and Karasahr, all of which decided to ally with the Northern Xiongnu. By 61 CE Khotan had conquered Yarkand, yet this led to a war among the kingdoms to decide which would be the next hegemon. The Northern Xiongnu took advantage of the infighting, conquered the Tarim Basin, and used it as a base to stage raids into Han's Hexi Corridor by 63 CE. In that year, the Han court opened border markets for trade with the Northern Xiongnu in hopes to appease them.
Yet Han sought to reconquer the Tarim Basin. At the Battle of Yiwulu in 73 CE, Dou Gu (d. 88 CE) reached as far as Lake Barkol when he defeated a Northern Xiongnu chanyu and established an agricultural garrison at Hami. Although Dou Gu was able to evict the Xiongnu from Turpan in 74 CE, when the Han appointed Chen Mu (d. 75 CE) as the new Protector General of the Western Regions, the Northern Xiongnu invaded the Bogda Mountains while their allies Karasarh and Kucha killed Chen Mu and his troops. The Han garrison at Hami was forced to withdraw in 77 CE (and was not reestablished until 91 CE). The next Han expedition against the Northern Xiongnu was led in 89 CE by Dou Xian (d. 92 CE); at the Battle of Ikh Bayan, Dou's forces chased the Northern Chanyu into the Altai Mountains, allegedly killing 13,000 Xiongnu and accepting the surrender of 200,000 Xiongnu from 81 tribes.
After Dou sent 2,000 cavalry to attack the Northern Xiongnu base at Hami, he was followed by the initiative of the general Ban Chao (d. 102 CE), who earlier installed a new king of Kashgar as a Han ally. When this king turned against him and enlisted the aid of Sogdiana in 84 CE, Ban Chao arranged an alliance with the Kushan Empire (of modern North India, Pakistan, Afghanistan, and Tajikistan), which put political pressure on Sogdiana to back down; Ban later assassinated King Zhong of Kashgar. Since Kushan provided aid to Ban Chao in quelling Turpan and sent tribute and hostages to Han, its ruler Vima Kadphises (r. c. 90 – c. 100 CE) requested a Chinese princess bride; when this was rejected in 90 CE, Kushan marched 70,000 troops to Wakhan against Ban Chao. Ban used scorched earth tactics against Kushan, forcing them to request food supplies from Kucha. When Kushan messengers were intercepted by Ban, Kushan was forced to withdraw. In 91 CE, Ban was appointed as Protector General of the Western Regions, an office he filled until 101 CE.
Tributary gifts and emissaries from the Arsacid Empire, then under Pacorus II of Parthia (r. 78–105 CE), came to the Han in 87, 89, and 101 CE, bringing exotic animals such as ostriches and lions. When Ban Chao dispatched his emissary Gan Ying in 97 CE to reach Daqin (the Roman Empire), he did not reach farther than a "large sea", perhaps the Persian Gulf. However, from oral accounts Gan was able to describe Rome as having hundreds of walled cities, a postal delivery network, the submission of dependent states, and a system of government where the Roman "king" (i.e. consul) is "not a permanent figure but is chosen as the man most worthy." Elephants and rhinoceroses were also presented as gifts to the Han court in 94 and 97 CE by a king in what is now Burma. The first known diplomatic mission from a ruler in Japan came in 57 CE (followed by another in 107 CE); a golden seal of Emperor Guangwu's was even discovered in 1784 in Chikuzen Province. The first mention of Buddhism in China was made in 65 CE, when the Chinese clearly associated it with Huang-Lao Daoism. Emperor Ming had the first Buddhist temple of China—the White Horse Temple—built at Luoyang in honour of two foreign monks: Jiashemoteng (Kāśyapa Mātanga) and Zhu Falan (Dharmaratna the Indian). These monks allegedly translated the Sutra of Forty-two Chapters from Sanskrit into Chinese, although it is now proven that this text was not translated into Chinese until the 2nd century CE.

### Court, kinsmen, and consort clans

Besides his divorcing Guo Shengtong in 41 CE to install his original wife Empress Yin Lihua as empress instead, there was little drama with imperial kinsmen at Guangwu's court, as Empress Guo was made a queen dowager and her son, the former heir apparent, was demoted to the status of a king. However, trouble with imperial kinsmen turned violent during Ming's reign. In addition to exiling his half-brother Liu Ying (d. 71 CE, committed suicide) after Liu Ying allegedly used witchcraft to curse him, Emperor Ming also targeted hundreds of others with similar charges (of using occult omens and witchcraft) resulting in exile, torture for gaining confessions, and execution. This trend of persecution did not end until Emperor Zhang took the throne, who was for the most part generous towards his brothers and called back many to the capital who had been exiled by Ming.
Of greater consequence for the dynasty, however, was Emperor He's coup of 92 CE in which eunuchs made their first significant involvement in court politics of Eastern Han. Emperor Zhang had upheld a good relationship with his titular mother and Ming's widow, the humble Empress Dowager Ma (d. 79 CE), but Empress Dowager Dou (d. 97 CE), the widow of Emperor Zhang, was overbearing towards Emperor He (son of Emperor Zhang and Consort Liang) in his early reign and, concealing the identity of his natural mother from him, raised He as her own after purging the Liang family from power. To put He on the throne, Empress Dowager Dou had even demoted the crown prince Liu Qing (78–106 CE) as a king and forced his mother, Consort Song (d. 82 CE) to commit suicide. Unwilling to yield his power to the Dou clan any longer, Emperor He enlisted the aid of palace eunuchs led by Zheng Zhong (d. 107 CE) to overthrow the Dou clan on charges of treason, stripping them of titles, exiling them, forcing many to commit suicide, and had the Empress Dowager placed under house arrest.

## Middle age of Eastern Han
### Empress Deng Sui, consort families, and eunuchs

Empress Deng Sui (d. 121 CE), widow to Emperor He, became empress dowager in 105 CE and thus had the final say in appointing He's successor (since he had appointed none); she placed his infant son Liu Long on the throne, later known as Emperor Shang of Han (r. 105–106). When the latter died at only age one, she placed his young nephew Liu Hu (Liu Qing's son) on the throne, known posthumously as Emperor An of Han (r. 106–125 CE), bypassing Emperor He's other son Liu Sheng (劉勝). With a young ruler on the throne, Empress Deng was the de facto ruler until her death, since her brother Deng Zhi's (鄧騭) brief occupation as the General-in-Chief (大將軍) from 109 to 110 CE did not in fact make him the ruling regent. With her death on 17 April 121 CE, Emperor An accepted the charge of eunuchs Li Run (李閏) and Jiang Jing (江京) that she had plotted to overthrow him; on 3 June he charged the Deng clan with treason and had them dismissed from office, stripped of title, reduced to commoner status, exiled to remote areas, and drove many to commit suicide.
The Yan clan of Empress Yan Ji (d. 126 CE), wife of Emperor An, and the eunuchs Jiang Jing and Fan Feng (樊豐) pressured Emperor An to demote his nine-year-old heir apparent Liu Bao to the status of a king on 5 October 124 CE on charges of conspiracy, despite protests from senior government officials. When Emperor An died on 30 April 125 CE the Empress Dowager Yan was free to choose his successor, Liu Yi (grandson of Emperor Zhang), who is known as Emperor Shao of Han. After the child died suddenly in 125 CE, the eunuch Sun Cheng (d. 132 CE) made a palace coup, slaughtering the opposing eunuchs, and thrust Liu Bao on the throne, later to be known as Emperor Shun of Han (r. 125–144 CE); Sun then put Empress Dowager Yan under house arrest, had her brothers killed, and the rest of her family exiled to Vietnam.
Emperor Shun had no sons with Empress Liang Na (d. 150 CE), yet when his son Liu Bing briefly took the throne in 145 CE, the mother of the latter, Consort Yu, was in no position of power to challenge Empress Dowager Liang. After the child Emperor Zhi of Han (r. 145–146 CE) briefly sat on the throne, Empress Dowager Liang and her brother Liang Ji (d. 159 CE), now regent General-in-Chief, decided that Liu Zhi, known posthumously as Emperor Huan of Han (r. 146–168 CE), should take the throne, as he was betrothed to their sister Liang Nüying. When the younger Empress Liang died in 159 CE, Liang Ji attempted to control Emperor Huan's new favourite Consort Deng Mengnü (later to become empress; d. 165 CE). When she resisted Liang Ji had her brother-in-law killed, prompting Emperor Huan to use eunuchs to oust Liang Ji from power; the latter committed suicide when his residence was surrounded by imperial guards. Emperor Huan died with no official heir, so his third wife Empress Dou Miao (d. 172 CE), now the empress dowager, had Liu Hong, known posthumously as Emperor Ling of Han (r. 168–189 CE), take the throne.

### Reforms and policies of middle Eastern Han

To mitigate the damage caused by a series of natural disasters, Empress Dowager Deng's government attempted various relief measures of tax remissions, donations to the poor, and immediate shipping of government grain to the most hard-hit areas. Although some water control works were repaired in 115 CE and 116 CE, many government projects became underfunded due to these relief efforts and the armed response to the large-scale Qiang people's rebellion of 107–118 CE. Aware of her financial constraints, the Empress Dowager limited the expenses at banquets, the fodder for imperial horses who weren't pulling carriages, and the amount of luxury goods manufactured by the imperial workshops. She approved the sale of some civil offices and even secondary marquess ranks to collect more revenue; the sale of offices was continued by Emperor Huan and became extremely prevalent during Emperor Ling's reign.
Emperor An continued similar disaster relief programs that Empress Dowager Deng had implemented, though he reversed some of her decisions, such as a 116 CE edict requiring officials to leave office for three years of mourning after the death of a parent (a Confucian more). Since this seemed to contradict Confucian morals, Emperor An's sponsorship of renowned scholars was aimed at shoring up popularity among Confucians. Xu Shen (58–147 CE), although an Old Text scholar and thus not aligned with the New Text tradition sponsored by Emperor An, enhanced the emperor's Confucian credentials when he presented his groundbreaking dictionary to the court, the Shuowen Jiezi.
Financial troubles only worsened in Emperor Shun's reign, as many public works projects were handled at the local level without the central government's assistance. Yet his court still managed to supervise the major efforts of disaster relief, aided in part by a new invention in 132 CE of a seismometer by the court astronomer Zhang Heng (78–139 CE) who used a complex system of a vibration-sensitive swinging pendulum, mechanical gears, and falling metal balls to determine the direction of earthquakes hundreds of kilometres away. Shun's greatest patronage of scholarship was repairing the now dilapidated Imperial University in 131 CE, which still operated as a pathway for young gentrymen to enter civil service. Officials protested against the enfeoffment of eunuch Sun Cheng and his associates as marquesses, with further protest in 135 CE when Shun allowed the sons of eunuchs to inherit their fiefs, yet the larger concern was over the rising power of the Liang faction.
To abate the unseemly image of placing child emperors on the throne, Liang Ji attempted to paint himself as a populist by granting general amnesties, awarding people with noble ranks, reducing the severity of penalties (the bastinado was no longer used), allowing exiled families to return home, and allowing convicts to settle on new land in the frontier. Under his stewardship, the Imperial University was given a formal examination system whereby candidates would take exams on different classics over a period of years to gain entrance into public office. Despite these positive reforms, Liang Ji was widely accused of corruption and greed. Yet when Emperor Huan overthrew Liang by using eunuch allies, students of the Imperial University took to streets in the thousands chanting the names of the eunuchs they opposed in one of the earliest student protests in history.
After Liang Ji was overthrown, Huan distanced himself from the Confucian establishment and instead sought legitimacy through a revived imperial patronage of Huang-Lao Daoism; this renewed patronage of Huang-Lao was not continued after his reign. As the economy worsened, Huan built new hunting parks, imperial gardens, palace buildings, and expanded his harem to house thousands of concubines. The gentry class became alienated by Huan's corrupt government dominated by eunuchs and many refused nominations to serve in office, since current Confucian beliefs dictated that morality and personal relationships superseded public service. Emperor Ling hosted much less concubines than Huan, yet Ling left much of the affairs of state to his eunuchs. Instead, Ling busied himself play-acting as a traveling salesman with concubines dressed as market vendors or dressing in military costume as the 'General Supreme' for his parading Army of the Western Garden.

### Foreign relations and war of middle Eastern Han

The Eastern Han court colonised and periodically reasserted the Chinese military presence in the Western Regions only as a means to combat the Northern Xiongnu. Han forces were expelled from the Western Regions first by the Xiongnu between 77 and 90 CE and then by the Qiang between 107 and 122 CE. In both of these periods, the financial burdens of reestablishing and expanding western colonies, as well as the liability of sending financial aid requested by Tarim Basin tributary states, were viewed by the court as reasons to forestall the reopening of foreign relations in the region.
At the beginning of Empress Dowager Deng's regency, the Protector General of the Western Regions Ren Shang (d. 118 CE) was besieged at Kashgar. Although he was able to break the siege, he was recalled and replaced before the Empress Dowager began to withdraw forces from the Western Regions in 107 CE. However, a transitional force was still needed. The Qiang people, who had been settled by the Han government in southeastern Gansu since Emperor Jing's reign, would aid Han in this withdrawal. Throughout Eastern Han, the Qiang often revolted against Han authority after Han border officials robbed them of goods and even women and children. A group of Qiang people conscripted to reinforce the Protector General during his withdrawal decided instead to mutiny against him. Their revolt in the northwestern province of Liang (涼州) was put down in 108 CE, but it spurred a greater Qiang rebellion that would last until 118 CE, cutting off Han's access to Central Asia. The Qiang problem was exacerbated in 109 CE by a combined Southern Xiongnu, Xianbei, and Wuhuan rebellion in the northeast. The total monetary cost for putting down the Qiang rebellion in Liang province was 24 million cash (out of an average of 220 million cash minted annually), while the people of three entire commanderies within eastern Liang province and one commandery within Bing province were temporarily resettled in 110 CE.
Following general Ban Yong's reopening of relations with the Western Regions in 123 CE, two of the Liang province commanderies were reestablished in 129 CE, only to be withdrawn again a decade later. Even after eastern Liang province (comprising modern southeastern Gansu and Ningxia) was resettled, there was another massive rebellion there in 184 CE, instigated by Han Chinese, Qiang, Xiongnu, and Yuezhi rebels. Yet the Tarim-Basin states continued to offer tribute and hostages to China into the final decade of Han, while the agricultural garrison at Hami was not gradually abandoned until after 153 CE.
Of perhaps greater consequence for the Han dynasty and future dynasties was the ascendance of the Xianbei people. They filled the vacuum of power on the vast northern steppe after the Northern Xiongnu were defeated by Han and fled to the Ili River valley (modern Kazakhstan) in 91 CE. The Xianbei quickly occupied the deserted territories and incorporated some 100,000 remnant Xiongnu families into their new federation, which by the mid-2nd century CE stretched from the western borders of the Buyeo Kingdom in Jilin, to the Dingling in southern Siberia, and all the way west to the Ili River valley of the Wusun people. Although they raided Han in 110 CE to force a negotiation of better trade agreements, the later leader Tanshihuai (d. 181 CE) refused kingly titles and tributary arrangements offered by Emperor Huan and defeated Chinese armies under Emperor Ling. When Tanshihuai died in 180 CE, the Xianbei Federation largely fell apart, yet it grew powerful once more during the 3rd century CE.
After being introduced in the 1st century CE, Buddhism became more popular in China during the 2nd century CE. The Parthian monk An Shigao travelled from Parthia to China in 148 CE and made translations of Buddhists works on the Hinayana and yoga practices which the Chinese associated with Daoist exercises. The Kushan monk Lokaksema from Gandhara was active in China from 178 to 198 CE, translated the Perfection of Wisdom and Pratyutpanna Sutra, and introduced to China the concepts of Akshobhya Buddha, Amitābha Buddha (of Pure Land Buddhism), and teachings about Manjusri. In 166 CE, Emperor Huan made sacrifices to Laozi and the Buddha. In that same year, the Book of Later Han records that Romans reached China from the maritime south and presented gifts to Huan's court, claiming they represented Roman emperor Marcus Aurelius Antoninus (Andun 安敦; r. 161–180 CE). Crespigny speculates that they were Roman merchants, not diplomats. Archaeological findings at Óc Eo (near Ho Chi Minh City) in the Mekong Delta, which was once part of the Kingdom of Funan bordering the Chinese province of Jiaozhi (in northern Vietnam), have revealed Mediterranean goods such as Roman gold medallions made during the reigns of Antoninus Pius and Marcus Aurelius. Óc Eo may have been the same Southeast Asian seaport city mentioned in the 2nd-century Geography by the Greco-Roman writer Ptolemy (as well as in the work of Marinus of Tyre), a city called Cattigara where a Greek sailor named Alexandros allegedly visited by sailing northeast of the Golden Peninsula (i.e. the Malay Peninsula) into the Magnus Sinus (i.e. Gulf of Thailand and South China Sea).

## Decline of Eastern Han
### Partisan Prohibitions

In 166 CE, the official Li Ying (李膺) was accused by palace eunuchs of plotting treason with students at the Imperial University and associates in the provinces who opposed the eunuchs. Emperor Huan was furious, arresting Li and his followers, who were only released from prison the following year due to pleas from the General-in-Chief Dou Wu (d. 168 CE; Emperor Huan's father-in-law). However, Li Ying and hundreds of his followers were proscribed from holding any offices and were branded as partisans (黨人).
After Emperor Huan's death, at the urging of the Grand Tutor (太傅) Chen Fan (陳蕃; d. 168 CE), Dou Wu presented a memorial to the court in June 168 CE denouncing the leading eunuchs as corrupt and calling for their execution, but Empress Dowager Dou refused the proposal. This was followed by a memorial presented by Chen Fan calling for the heads of Hou Lan (d. 172 CE) and Cao Jie (d. 181 CE), and when this too was refused Dou Wu took formal legal action which could not be ignored by the court. When Shan Bing, a eunuch associate of Chen and Dou's, gained a forced confession from another eunuch that Cao Jie and Wang Fu (王甫) plotted treason, he prepared another damning written memorial on the night of 24–25 October which the opposing eunuchs secretly opened and read. Cao Jie armed Emperor Ling with a sword and hid him with his wet nurse, while Wang Fu had Shan Bing killed and Empress Dowager Dou incarcerated so that the eunuchs could use the authority of her seal.
Chen Fan entered the palace with eighty followers and engaged in a shouting match with Wang Fu, yet Chen was gradually surrounded, detained, and later trampled to death in prison that day (his followers were unharmed). At dawn, the general Zhang Huan (張奐), misled by the eunuchs into believing that Dou Wu was committing treason, engaged in a shouting match with Dou Wu at the palace gates, but as Dou's followers slowly deserted him and trickled over to Zhang's side, Dou was forced to commit suicide. In neither of these confrontations did any actual physical fighting break out.
With Dou Wu eliminated and the Empress Dowager under house arrest, the eunuchs renewed the proscriptions against Li Ying and his followers; in 169 CE they had hundreds more officials and students prohibited from serving office, sent their families into exile, and had Li Ying executed. The eunuchs barred potential enemies from court, sold and bartered offices, and infiltrated the military command. Emperor Ling even referred to eunuchs Zhao Zhong and Zhang Rang as his "mother" and "father"; the latter two had so much influence over the emperor that they convinced him not to ascend to the top floors of tall towers in the capital, which was an effort to conceal from him the enormous mansions that the eunuchs built for themselves. Although the partisan prohibitions were extended to hundreds more in 176 CE (including the distant relatives of those earlier proscribed), they were abolished in 184 CE with the outbreak of the Yellow Turban Rebellion, largely because the court feared the gentry—bitter from their banishment from office—would join the rebel cause.

### Yellow Turban Rebellion

In the Han dynasty's later decades, a growing number of heterodox sects appeared across the empire. These sects generally challenged the state ideology of Confucianism, and although most were peaceful, some eventually began to stage rebellions against the Han dynasty. One of the most influential sects was founded by Zhang Daolingin 142 CE, namely the Five Pecks of Rice religious society in Sichuan. After claiming to have seen the deified Laozi as a holy prophet who appointed him as his earthly representative known as the Celestial Master, Zhang created a highly organised, hierarchical Daoist movement which accepted only pecks of rice and no money from its lay followers. In 184 CE, the Five Pecks of Rice under Zhang Lu staged a rebellion in Sichuan and set up a theocratic Daoist state that endured until 215 CE.
Other religious movements included the sect of Xu Chang that waged a rebellion from 172 to 174 in eastern China. The most successful movement belonged to the Yellow Turban Daoists of the Yellow and Huai River regions. They built a hierarchical church and believed that illness was the result of personal sins needing confessions. The Yellow Turbans became a militant organisation that challenged Han authority by claiming they would bring about a utopian era of peace. Zhang Jue, renowned faith healer and leader of the Yellow Turbans, and his hundreds of thousands of followers, designated by the yellow cloth that they wrapped around their foreheads, led a rebellion across eight provinces in 184 CE. They had early successes against imperial troops but by the end of 184 CE the Yellow Turban leadership—including Zhang—had been killed. Smaller groups of Yellow Turbans continued to revolt in the following years (until the last large group was incorporated into the forces of Chancellor Cao Cao in 192 CE), yet Crespigny asserts that the rebellion's impact on the fall of Han was less consequential than events which transpired in the capital following the death of Emperor Ling on 13 May 189 CE. However, Patricia Ebrey points out that many of the generals who raised armies to quell the rebellion never disbanded their forces and used them to amass their own power outside of imperial authority.

### Downfall of the eunuchs

He Jin (d. 189 CE), half-brother to Empress He (d. 189 CE), was given authority over the standing army and palace guards when appointed as General-in-Chief during the Yellow Turban Rebellion. Shortly after Empress He's son Liu Bian, known later as Emperor Shao of Han, was put on the throne, the eunuch Jian Shi plotted against He Jin, was discovered, and executed on 27 May 189 CE; He Jin thus took over Jian's Army of the Western Garden. Yuan Shao (d. 202 CE), then an officer in the Army of the Western Garden, plotted with He Jin to overthrow the eunuchs by secretly ordering several generals to march towards the capital and forcefully persuade the Empress Dowager He to hand over the eunuchs. Yuan had these generals send in petition after petition to the Empress Dowager calling for the eunuchs' dismissal; Mansvelt Beck states that this "psychological war" finally broke the Empress Dowager's will and she consented. However, the eunuchs discovered this and used Empress Dowager He's mother Lady Wuyang and her brother He Miao (何苗), both of whom were sympathetic to the eunuchs, to have the order rescinded. On 22 September, the eunuchs learned that He Jin had a private conversation with the Empress Dowager about executing them. They sent message to He Jin that the Empress Dowager had more words to share with him; once he sat down in the hall to meet her, eunuchs rushed out of hiding and beheaded He Jin. When the eunuchs ordered the imperial secretaries to draft an edict dismissing Yuan Shao, the former asked for He Jin's permission, so the eunuchs showed them He Jin's severed head.
However, the eunuchs became besieged when Yuan Shao attacked the Northern Palace and his brother Yuan Shu (d. 199 CE) attacked the Southern Palace, breaching the gate and forcing the eunuchs to flee to the Northern Palace by the covered passageway connecting both. Zhao Zhong was killed on the first day and the fighting lasted until 25 September when Yuan Shao finally broke into the Northern Palace and purportedly slaughtered two thousand eunuchs. However, Zhang Rang managed to flee with Emperor Shao and his brother Liu Xie to the Yellow River, where he was chased down by the Yuan family troops and committed suicide by jumping into the river and drowning.

### Coalition against Dong Zhuo

Dong Zhuo (d. 192 CE), General of the Vanguard (under Huangfu Song) who marched on to Luoyang under Yuan Shao's request, saw the capital in flames from a distance and heard that Emperor Shao was wandering in the hills nearby. When Dong approached Emperor Shao, the latter became frightened and unresponsive yet his brother Liu Xie explained to Dong what had happened. The ambitious Dong took over effective control of Luoyang and forced Yuan Shao to flee the capital on 26 September. Dong was made Excellency of Works (司空), one of the Three Excellencies. Despite protests, Dong had Emperor Shao demoted as the Prince of Hongnong on 28 September while elevating his brother Liu Xie as emperor, later known as Emperor Xian of Han (r. 189–220 CE). Empress Dowager He was poisoned to death by Dong Zhuo on 30 September, followed by Liu Bian on 3 March 190 CE.
Yuan Shao, once he left the capital, led a coalition of commanders, former officials, and soldiers of fortune to challenge Dong Zhuo. No longer viewing Luoyang as a safehaven, Dong burned the city to the ground and forced the imperial court to resettle at Chang'an in May 191 CE. In a conspiracy headed by the Minister over the Masses, Wang Yun (d. 192 CE), Dong was killed by his adopted son Lü Bu (d. 198 CE). Dong's subordinates then killed Wang and forced Lü to flee, throwing Chang'an into chaos.
Emperor Xian fled Chang'an in 195 CE and returned to Luoyang by August 196 CE. Meanwhile, the empire was being carved into eight spheres of influence, each ruled by powerful commanders or officials: in the northeast there was Yuan Shao and Cao Cao (155–220 CE); south of them was Yuan Shu, located just southeast of the capital; south of this was Liu Biao (d. 208 CE) in Jing; Sun Ce (d. 200 CE) controlled the southeast; in the southwest there was Liu Zhang (d. 219 CE) and Zhang Lu (d. 216 CE) located just north of him in Hanzhong; the southern part of Liang Province was inhabited by the Qiang people and various rebel groups. Although prognostication fuelled speculation over the dynasty's fate, these warlords still claimed loyalty to Han, since the emperor was still at the pinnacle of a cosmic-religious system which ensured his political survival.

### Rise of Cao Cao

Cao Cao, a Commandant of Cavalry during the Yellow Turban Rebellion and then Colonel in the Army of the Western Garden by 188 CE, was governor of Yan Province (modern western Shandong and eastern Henan) in 196 CE when he took the emperor from Luoyang to his headquarters at Xuchang. Yuan Shu declared his own Zhong dynasty (仲朝) in 197 CE, yet this bold move earned him the desertion of many of his followers, dying penniless in 199 CE after attempting to offer his title to Yuan Shao. Gaining more power after defeating Gongsun Zan (d. 199), Yuan Shao regretted not seizing the emperor when he had the chance and decided to act against Cao. The confrontation culminated in Cao Cao's victory at the Battle of Guandu in 200 CE, forcing Yuan to retreat to his territory. After Yuan Shao died in 202 CE, his sons fought over his inheritance, allowing Cao Cao to eliminate Yuan Tan (173–205 CE) and drive his brothers Yuan Shang and Yuan Xi to seek refuge with the Wuhuan people. Cao Cao asserted his dominance over the northeast when he defeated the Wuhuan led by Tadun at the Battle of White Wolf Mountain in 207 CE; the Yuan brothers fled to Gongsun Kang (d. 221 CE) in Liaodong, but the latter killed them and sent their heads to Cao Cao in submission.
When there was speculation that Liu Bei (161–223 CE), a scion of the imperial family who was formerly in the service of Cao Cao, was planning to take over the territory of the now ill Liu Biao in 208 CE, Cao Cao forced Liu Biao's son to surrender his father's land. Expecting Cao Cao to turn on him next, Sun Quan (182–252 CE), who inherited the territory of his brother Sun Ce in 200 CE, allied with Liu Bei and faced Cao Cao's naval force in 208 CE at the Battle of Chibi. This was a significant defeat for Cao Cao which ensured the continued disunity of China during the Three Kingdoms (220–265 CE).

### Fall of the Han

When Cao Cao moved Emperor Xian to Xuchang in 196 CE, he took the title of Excellency of Works as Dong Zhuo had before him. In 208 CE, Cao abolished the three most senior offices, the Three Excellencies, and instead recreated two offices, the Imperial Counselor and Chancellor; he occupied the latter post. Cao was enfeoffed as the Duke of Wei in 213 CE, had Emperor Xian divorce Empress Fu Shou in 214 CE, and then had him marry his daughter as Empress Cao Jie in 215 CE. Finally, Cao took the title King of Wei in 216 CE, violating the rule that only Liu family members could become kings, yet he never deposed Emperor Xian. After Cao Cao died in 220 CE, his son Cao Pi (186–226 CE) inherited the title King of Wei and gained the uneasy allegiance of Sun Quan (while Liu Bei at this point had taken over Liu Zhang's territory of Yi Province). With debates over prognostication and signs from heaven showing the Han had lost the Mandate of Heaven, Emperor Xian agreed that the Han dynasty had reached its end and abdicated to Cao Pi on 11 December 220 CE, thus creating the state of Cao Wei, soon to oppose Shu Han in 221 CE and Eastern Wu in 229 CE.