# An Lushan rebellion

The An Lushan rebellion was a civil war in China that lasted from 755 to 763, at the approximate midpoint of the Tang dynasty (618–907). It began as a commandery rebellion attempting to overthrow and replace the Tang government with the rogue Yan dynasty. The rebels succeeded in capturing the imperial capital Chang'an after the emperor had fled to Sichuan, but eventually succumbed to internal divisions and counterattacks by the Tang and their allies. The rebellion spanned the reigns of three Tang emperors: Xuanzong, Suzong, and Daizong.
On 16 December 755, An Lushan, the jiedushi of the Taiyuan Commandery, mobilized his army and marched to Fanyang. An Lushan led the rebellion for two years before he was assassinated by his son An Qingxu. Two years after An Qingxu's ascension, Shi Siming, the governor of Pinglu Commandery and a close ally of An Lushan, killed An Qingxu and usurped the leadership. Shi Siming ruled for two years, but was in turn killed by his own son Shi Chaoyi, who ruled for another two years until the Yan dynasty fell to Tang forces on 17 February 763. There were also other anti-Tang rebel forces, especially those in An Lushan's base area in Hebei, as well as Sogdian forces and other opportunist parties who took advantages of the chaos.
The rebellion was an important turning point in the history of medieval China, as the military activities and associated casualties caused significant depopulation from famine, displacement, and large-scale infrastructure destruction, significantly weakening the Tang dynasty, collapsing the prestige of the Tang emperors as the Khan of Heaven and leading to the permanent loss of the Western Regions. Even though the rebellion was ultimately suppressed by a large-scale alliance between the imperial dynasty and various participants, including local militias and foreign support, the dynasty did not overall change the structure of the military committee, but only followed the old principles of establishing territory. It was a direct cause of the dynasty's decline, and led to rampant secessionism among regional warlords during the latter half of the dynasty that continued into the Five Dynasties and Ten Kingdoms period for decades after the ultimate demise of the Tang. The fear of repeating Tang's commandery secessionism also led the Song dynasty that followed to distrust and oppress prominent military commanders even when invaded by hostile foreign states such as Liao, Western Xia and Jin. It also triggered the long-term decline of the Guanzhong region, which had been a political and economic heartland of China at least since the Han dynasty, and a shift of the economic center of China towards the Jiangnan region.

## Background
### Political

Beginning in 742, Eurasia entered a 13-year period of major political turmoil, with the regional empires generally suffering "a major rebellion, revolution, or dynastic change." In this year the Second Turkic Khaganate of the eastern Eurasian Steppe was overthrown and then replaced by Sogdian-influenced Uighur rulers. This was apparently the first of several revolutionary events either led by or intimately connected with the merchants and tradespeople involved with the international commerce often referred to as the Silk Road. In 747, the Abbasids began their rebellion against the Umayyad Caliphate in Merv, Khurasan, resulting in the proclamation of a new Abbasid Caliph in about 750. This rebellion also seems to have been organized by merchants and persons identifying themselves as merchants.
The western expansion of the Tang Empire was checked in 751 by the defeat of a large expeditionary force led by General Gao Xianzhi in the Battle of Talas in the modern Fergana Valley, with the Abbasid victory attributable to the defection of the Karluk Turks in the midst of the battle. However, the Arabs did not proceed any further after the battle, and the Tang retained their Central Asian territories until the An Lushan rebellion.
Further, southern expansion of the Tang was limited by the ineffective, and even disastrous, campaigns against the Kingdom of Nanzhao. However, the concurrent Tang campaign against the Tibetan Empire was proceeding more successfully, with the campaign to capture the Tibetans' Central Asian territories appearing nearly successful. With the assassination of the Tibetan emperor Me Agtsom in 755 in the midst of a major rebellion within the Tibetan polity, final Tang victory over the Tibetan Empire seemed all but assured. However, back in the increasingly financially challenged Chinese heartland, the Sogdian-Turkic General An Lushan had worked himself into a position of trust with the Tang emperor Xuanzong and his consort Yang Guifei.

### General An Lushan

An Lushan was a general of uncertain birth origins, but thought to have been adopted by a Sogdian father and Göktürk mother of the Ashina tribe. Eventually he managed to become a favorite of the reigning emperor of China. His success in this regard is shown, for example, by the luxurious house Emperor Xuanzong built for him in 751, in the capital Chang'an. The house was furnished with luxuries such as gold and silver objects and a pair of ten-foot-long (3.0 m) by six-foot-wide (1.8 m) couches appliqued with rare and expensive sandalwood.
He was appointed by Emperor Xuanzong (following the suggestion of Xuanzong's favorite concubine Yang Guifei and with the agreement of Chancellor Li Linfu) to be Jiedushi of three garrisons in the north—Pinglu, Fanyang and Hedong. In effect, An was given control over the entire area north of the lower reaches of the Yellow River, including garrisons about 164,000 strong. He took advantage of various circumstances, such as popular discontent with an extravagant Tang court, the synchronous Sogdian-involved Abbasid Revolution against the Umayyad dynasty, and eventually the absence of strong troops guarding the palace coupled with a string of natural disasters. An Lushan was very influential in the Tang court, his close relationship with Emperor Xuanzong led to him being adopted by the imperial concubine Yang Guifei. The positions of power of Yang clan members (the family of the preceding Sui dynasty into which the Tang emperor had married) were important in this situation, especially complicated by the position of Yang Guifei's relative Yang Guozhong in the Tang governmental administration.

## Course of the rebellion

The An Lushan rebellion signaled a period of disorder spanning the reigns of three Tang dynasty emperors, beginning during the final (Tianbao era) period of the reign of Xuanzong (8 September 712 to 12 August 756), continuing through the reign of Suzong (12 August 756 to 16 May 762) and ending during the reign of Daizong (18 May 762 to 23 May 779), as well as spanning the four imperial claimants of the failed Yan dynasty.

### Revolt and capture of Luoyang

At the end of 755 An Lushan revolted. On 16 December, his army surged down from Fanyang (near modern Beijing). Along the way, An Lushan treated surrendered local Tang officials with respect. As a result, more and more of them joined his ranks. He moved rapidly along the Grand Canal and captured the "Eastern Capital" city of Luoyang on 18 January 756, defeating the poorly supplied General Feng Changqing. There, on 5 February,^ An Lushan declared himself Emperor of the new Great Yan dynasty (大燕皇帝). His next steps would be to capture the Tang western capital of Chang'an and then to attempt to continue into southern China to complete his conquest.

### Battle of Yongqiu

However, the Battle of Yongqiu, in the spring of 756, went badly for An Lushan. Although his army, under Linghu Chao, was numerous, it was unable to make further territorial gains due to the failure to wrest control of Yongqiu (modern Qi County, Kaifeng, in Henan) and (later) the nearby Suiyang from the Tang defenders led by Zhang Xun. This prevented the Yan forces from conquering southern China, before the Tang were able to recover. The Yan army did not take control of Suiyang until after the Siege of Suiyang (January–October 757), almost two years after their initial capture of Luoyang.

### Advance on Chang'an

Originally, An Lushan's forces were blocked from the main imperial (or "Western") capital at Chang'an (modern Xi'an), by loyal troops placed in nearly impregnable defensive positions in the intervening high mountain passes of Tongguan. Unfortunately for Chang'an, the two generals in charge of the troops at Tong Pass, Gao Xianzhi and Feng Changqing, were executed due to a court intrigue involving the powerful eunuch Bian Lingcheng. Yang Guozhong, with grossly inept military judgment, then ordered the replacement General Geshu Han, who was in charge of the troops in the passes, together with reinforcement troops, to attack An's army on open ground. On 7 July, the Tang forces were defeated. The road to the capital now lay open.

### Flight of the emperor

With rebel forces clearly an imminent threat to the imperial seat of Chang'an, and with conflicting advice from his advisers, Tang emperor Xuanzong determined to flee to the relative sanctuary of Sichuan with its natural protection of mountain ranges so the Tang forces could reorganize and regroup. He brought along the bulk of his court and household. The route of travel from Chang'an to Sichuan was notoriously difficult, requiring hard travel on the way through the intervening Qin Mountains.
However, the geographical features of the terrain were not the only hardships on the journey: there was a matter that first had to be settled, involving the relationship between Xuanzong and the Yang family, especially the emperor's beloved Yang Guifei. So, before progressing more than a few kilometers along the way, an incident occurred at Mawei Inn, in today's Xingping in Xianyang, Shaanxi. Xuanzong's bodyguard troops were hungry and tired, and very angry with Yang Guozhong for exposing the whole country to danger. They demanded the death of the much-hated Yang Guozhong, and then of his cousin and imperial favorite, Yang Guifei. Soon the angry soldiers killed Yang Guozhong, Yang Xuan (his son), Lady Han and Lady Qin (Yang Guifei's sisters). With the army on the verge of mutiny, the Emperor had no choice but to agree, ordering the strangling of Lady Yang. The incident made Xuanzong fear for his own safety, so he fled to Chengdu at once. However, people stopped his horse, not wanting him to go away. So he made the crown prince, Li Heng, stay to hold the fort. Instead, Li Heng fled in the other direction to Lingzhou (today called Lingwu, in Ningxia province). Later, on 12 August, after reaching Sichuan, Xuanzong abdicated (becoming Taishang Huang), in favor of the crown prince, who had already been proclaimed emperor.

### Fall of Chang'an

In July 756 An Lushan and his rebel forces captured Chang'an, an event that had a devastating effect upon this thriving metropolis. Before the revolt, estimates put the population within the city walls at from 800,000 to 1,000,000. Including small cities in the vicinity forming the metropolitan area, the census in 742 recorded 362,921 families with 1,960,188 persons. Much of the population fled at the approach of the rebels. Then the city was captured and looted by the rebel forces and the remaining population put in jeopardy.

### A new Tang emperor

The third son of Xuanzong, Li Heng, was proclaimed Emperor Suzong at Lingzhou (modern-day Lingwu), although another group of local officials and Confucian literati tried to promote a different prince, Li Lin, the Prince of Yong, at Jinling (modern-day Nanjing). One of Suzong's first acts as emperor was to appoint the generals Guo Ziyi and Li Guangbi to deal with the rebellion. The generals, after much discussion, decided to borrow troops from an offshoot of the Turkic Tujue tribe, the Huihe, or Huige, also known as the Uyghur Khaganate, who were ruled by Bayanchur Khan until his death in the summer of 759. Three thousand Arab mercenaries were sent by the Abbasid caliph al-Mansur to join the Tang in 756 against An Lushan. With Uyghur assistance, the Tang Imperial forces recaptured both Chang'an and Luoyang in late 757. However, they failed to capture or subdue the rebel troops, who fled to the rebel heartland in the northeast.
Uyghur Khaganate diplomats clashed against Arab Abbasid diplomats over who would enter the diplomatic hall in Chang'an first in 758.

### Role of Nestorian Christians and Esoteric Buddhists against An Lushan

The Nestorian Church of the East Christians like the Bactrian Priest Yisi of Balkh helped the Tang dynasty general Guo Ziyi militarily crush the An Lushan rebellion, with Yisi personally acting as a military commander and Yisi and the Nestorian Church of the East were rewarded by the Tang dynasty with titles and positions as described in the Nestorian Stele. $^{:57,77,78,95,104}$
Epitaphs were found dating from the Tang dynasty of a Christian couple in Luoyang of a Nestorian Christian Sogdian woman, Lady An (安氏) who died in 821 and her Nestorian Christian Han Chinese husband, Hua Xian (花獻) who died in 827. These Han Chinese Christian men may have married Sogdian Christian women because of a lack of Han Chinese women belonging to the Christian religion, limiting their choice of spouses among the same ethnicity.$^{:109–135,viii,xv,156,164,115,116}$ Another epitaph in Luoyang of a Nestorian Christian Sogdian woman also surnamed An was discovered and she was put in her tomb by her military officer son on 22 January 815. This Sogdian woman's husband was surnamed He (和) and he was a Han Chinese man and the family was indicated to be multiethnic on the epitaph pillar.$^{:149–150,155–156,viii,xv}$ In Luoyang, the mixed raced sons of Nestorian Christian Sogdian women and Han Chinese men had many career paths available for them. Neither their mixed ethnicity nor their faith were barriers and they were able to become civil officials, military officers, and to openly celebrate their Christian religion and support Christian monasteries.$^{:164}$
Vajrayana Buddhist master Amoghavajra assisted the Tang dynasty state against the An Lushan rebellion. He carried out Vajrayana rituals which were ostensibly effective in supernaturally attacking and destroying An Lushan's army including the death of one of An Lushan's generals, Zhou Zhiguang.
Amoghavajra used his rituals against An Lushan while staying in Chang'an when it was occupied in 756 while the Tang dynasty crown prince and Xuanzong emperor had retreated to Sichuan. Amoghavajra's rituals were explicitly intended to introduce death, disaster and disease against An Lushan. As a result of Amoghavajrya's assistance in crushing An Lushan, Estoteric Buddhism became the official state Buddhist sect supported by the Tang dynasty, "Imperial Buddhism" with state funding and backing for writing scriptures, and constructing monasteries and temples. The disciples of Amoghavajra did ceremonies for the state and emperor. Tang dynasty Emperor Suzong was crowned as cakravartin by Amoghavajra after victory against An Lushan in 759 and he had invoked the Acala vidyaraja against An Lushan. The Tang dynasty crown prince Li Heng (later Suzong) also received important strategic military information from Chang'an when it was occupied by An Lushan through secret messages sent by Amoghavajra.

### Siege of Suiyang

In the beginning of 757 and continuing through October of that year, a protracted stalemate between the Yan and Tang forces occurred in Suiyang. The siege was noted for the Tang army's determination to fight to the last man, as well as the large-scale cannibalism practised by the defenders, who in this way were able to hold out longer. Their resistance effectively blocked the Yan forces from attacking the extensive areas south of the Yangzi River, which remained relatively untouched by the An–Shi disturbances.

### Death of An Lushan, An Qingxu became Emperor of Yan

The Tang imperial forces were also helped by the newly formed dynasty's internal fighting. On 29 January 757, An Lushan was betrayed and killed by his son, An Qingxu, (An Lushan's violent paranoia posed too much of a threat to his entourage). The rebel An Lushan had a Khitan eunuch named Li Zhu'er (李豬兒, Li Chu-erh) who was working for An Lushan when he was a teenager but An Lushan used a sword to sever his genitals and he almost died after losing multiple pints of blood. An Lushan revived him after smearing ashes on his injury. Li Zhu'er was An Lushan's eunuch after this and highly used and trusted by him. Li Zhu'er and another two men helped carry the obese An Lushan when he was taking off or putting on his clothes. (A horse was once crushed to death under An Lushan's sheer weight due to his fatness.) Li Zhu'er helped clothe and unclothe him at the Huaqing (Hua-ch'ing) steam baths granted by Emperor Xuanzang. Li Zhuer was approached by people who wanted to assassinate An Lushan after An Lushan became paranoid and blind, stricken with skin disease and started flogging and murdering his subordinates. An Lushan was hacked to death by Li Zhuer and another conspirator, Yan Zhuang (嚴莊, Yen Chuang) who was beaten by An previously. An Lushan screamed "this is a thief of my own household" as he desperately shook his curtains since he could not find his sword to defend himself. An Lushan's intestines came out of his body as he was hacked to death by Li Zhuer and Yan Zhuang.$^{:41}$
It was said that An Qingxu was an introvert who couldn't speak to others properly. As a result, Yan Zhuang advised him not to meet officials frequently, and he entrusted most of affairs of state to Yan and created Yan the Prince of Fengyi. He tried to ingratiate his generals by promoting their positions. Meanwhile, with the major general Shi Siming besieging the Tang general Li Guangbi at Taiyuan, An Qingxu ordered Shi to return to his base of Fanyang and leave the general Cai Xide (蔡希德) at Taiyuan to watch Li Guangbi's actions. He also sent the general Yin Ziqi (尹子奇) to attack the city of Suiyang, then under the defense by the Tang generals Zhang Xun and Xu Yuan (許遠), intending to capture Suiyang first and then send Yin south to capture Tang territory south of the Huai River (Yin, however, was locked into a siege of Suiyang that would last until winter 757, stopping any possibility of Yan's advancing south). To show favor to Shi, he created Shi the Prince of Guichuan and made him the jiedushi of Fanyang Circuit; instead, Shi, hoarding the supplies that An Lushan had previously shipped to Fanyang, began to disobey An Qingxu's orders, and An Qingxu could not keep him in check. When the Tang general Guo Ziyi attacked Tong Pass, intending to recapture Chang'an, however, An was able to send forces to repel Guo's attack.

### Siege of Yecheng

However, the Tang prince Li Chu the Prince of Guangping (the son of Li Heng, who by this point had taken imperial title as Emperor Suzong), with aid from Huige, was able to recapture Chang'an in summer 757 by defeating Yan forces in the Battle of Xiangji Temple. Tang forces under Li Chu and Huige forces then advanced east, toward Luoyang. In winter 757, An put together his forces and sent them, under Yan Zhuang's command, to defend Shan Commandery (陝郡, roughly modern Sanmenxia, Henan). When Yan forces engaged Tang forces, however, they saw that Huige forces were on Tang's side, and, in fear, they collapsed. Yan Zhuang and Zhang Tongru (張通儒) fled back to Luoyang to inform An, and An, after executing some 30 Tang generals who had been captured, abandoned Luoyang and fled north, to Yecheng, which he converted to Ancheng Municipality.
At the time that An arrived at Yecheng, he had only 1,000 infantry soldiers and 300 cavalry soldiers. Soon, however, Yan generals Ashina Chengqing (阿史那承慶), Cai Xide, Tian Chengsi, and Wu Lingxun (武令珣), who had been attacking other Tang cities, headed to Yecheng and coalesced there, allowing An to have over 60,000 soldiers under his disposal and thus regaining some measure of strength. Meanwhile, apprehensive of Shi, he sent Ashina and An Shouzhong (安守忠) to Fanyang to order Shi to contribute troops, but was intending to have Ashina and An Shouzhong take over Shi's command if possible. Instead, Shi arrested Ashina and An Shouzhong and submitted to Tang. Many other cities previously under Yan's control also submitted to Tang, and An Qingxu's territory shrank to just Yecheng and the surrounding area. It was said that An Qingxu became cruel and paranoid in light of these military losses, and that if generals submitted to Tang, he would slaughter their families if they were Han and their tribes if they were non-Han. Meanwhile, believing accusations that Zhang made against Cai, he killed Cai, which further led to dissension among his soldiers, particularly since he then put Cui Qianyou (崔乾祐) in command of his army, and the soldiers resented Cui for his harshness.
By winter 758, the Tang generals Guo Ziyi, Lu Jiong (魯炅), Li Huan (李奐), Xu Shuji (許叔冀), Li Siye, Ji Guangchen (季廣琛), Cui Guangyuan (崔光遠), Dong Qin (董秦), Li Guangbi, and Wang Sili (王思禮), were gathering at Yecheng and putting it under siege. An Qingxu tried to fight out of the siege, but was defeated by Tang forces, and his brother An Qinghe (安慶和) was killed. Meanwhile, with Shi recently having again rebelled against Tang, An sent the general Xue Song to Fanyang to seek aid from Shi, offering the throne to him. Shi thus advanced south toward Yecheng. Meanwhile, Tang forces, under the command of nine generals (with Li Siye having died during the siege), were uncoordinated. On 7 April 759, Shi engaged Tang forces—and, when a storm suddenly arrived, both armies panicked; Shi's forces fled north, and Tang forces fled south, lifting the siege on Yecheng. An Qingxu's forces gathered the food and supplies abandoned by Tang forces, and An thereafter considered, with Sun Xiaozhe (孫孝哲) and Cui, the possibility of refusing Shi, who gathered his troops and again approached Yecheng, admittance. Shi himself was not communicating with An, but was feasting his soldiers and watching Yecheng. Zhang and Gao Shang (高尚) requested permission to meet Shi, and An agreed; Shi gave them gifts and let them return to Yecheng. An, unsure what to do, again offered the throne to Shi, which Shi declined. Shi instead suggested to him that perhaps they could both be emperors of independent, allied states. An, pleased, exited Yecheng and met with Shi to swear to the alliance.

### Resurgence under Shi Siming

On 10 April 759, An Qingxu was killed by Shi Siming who enthroned as Emperor Zhaowu of Yan. Shi Siming soon left Empress Xin's son Shi Chaoqing (史朝清) in charge of Fanyang and headed south. He quickly captured Bian Prefecture (汴州, roughly modern Kaifeng, Henan) and Luoyang, but his further attempts to advance were rebuffed by Tang forces at Heyang (河陽, in modern Jiaozuo, Henan) and Shan Prefecture (陝州, roughly modern Sanmenxia, Henan), and the sides stalemated.
At this time, Shi was described as cruel and prone to kill, terrorizing his army. He favored Shi Chaoqing over Shi Chaoyi and considered creating Shi Chaoqing crown prince and killing Shi Chaoyi.
In spring 761, Shi Siming began another attempt to attack Shan Prefecture, wanting to attack Chang'an. He had Shi Chaoyi serve as his forward commander, but Shi Chaoyi was repeatedly repelled by the Tang general Wei Boyu (衛伯玉). Shi Siming was angered by Shi Chaoyi's failures and considered punishing him and the generals below him. On 18 April, Shi Siming ordered Shi Chaoyi to build a triangular fort with a hill as its side, to store food supplies, and ordered that it be completed in one day. Near the end of the day, Shi Chaoyi had completed it, but had not plastered the walls with mud, when Shi Siming arrived and rebuked him for not applying mud. He ordered his own servants to stay and watch the plastering. He then angrily stated, "After I capture Shan Prefecture, I will kill you, thief!" That night, Shi Chaoyi's subordinates Luo Yue (駱悅) and Cai Wenjing (蔡文景) warned him that he was in dire straits—and that if he refused to take action to depose Shi Siming, they would defect to Tang. Shi Chaoyi agreed to take action, and Luo persuaded Shi Siming's guard commander General Cao (personal name lost to history) to agree with the plot. That night, Luo led 300 soldiers and ambushed Shi Siming, binding him and then beginning a return to Luoyang with the troops. On the way back to Luoyang, Luo feared that someone might try to rescue Shi Siming, and so strangled him to death. Shi Chaoyi was enthroned as the new emperor of Yan even though he failed to get widespread support from the other Yan generals.

### Implosion of Yan and end of the rebellion

By 762, Emperor Suzong had become seriously ill; and the combined forces of the Tang and their Huige allies were led by his eldest son. This son, first named Li Chu, was renamed Li Yu in 758, after being named crown prince. On 18 May 762, on the death of his father, he became Emperor Daizong of Tang.
By this time it was clear that the new Yan dynasty would not last and Yan officers and soldiers began to defect to the Tang side. Then, in the winter of 762, the eastern capital Luoyang was retaken by Tang forces for the second time. Yan Emperor Shi Chaoyi attempted to flee, but was intercepted early in 763. Shi Chaoyi chose suicide over capture, dying on 17 February 763, ending the eight-year-long rebellion.

### Aftermath

The end of the rebellion was a long process of rebuilding and recovery. Due to the Imperial Court's weakened condition, other disturbances flared up. The Tibetan Empire under Trisong Detsän, taking advantage of the Tang's weakness, proceeded to briefly capture Chang'an on 18 November 763 before conquering much of Tang's territories in Central Asia. In 765, Pugu Huai'en, allied with Uyghur and Tibetan forces launched another siege on Chang'an.
Furthermore, Yan generals who had surrendered to Tang were allowed by Emperor Daizong to retain as independent military governors (Jiedushi), this began an era of warlordism that plagued Tang for the rest of the dynasty.
In 781, The Circuits of Shannan East, Chengde, Weibo and Zhiqing rose up against Tang court in what was called the Four Garrisons Rebellion (四鎮之亂). In 782, a Tang general-governor of Huaxi-Cicuit, Li Xilie also rebelled in 782 and proclaimed as the Emperor of Chu. In 783, the Jingyuan mutiny forced the Emperor Dezong to flee Chang'an. Zhu Ci, the jiedushi of Lulong, captured the city and declared himself emperor of a new state of Qin (later changed to Han). In 784, Zhu Ci was defeated and killed.

#### Hebei Three Circuits

Li Huaixian and fellow Yan generals Xue Song, Li Baochen, and Tian Chengsi submitted to Tang thus were allowed to keep their territory. Li Huaixian was made the military governor (jiedushi) of Lulong Circuit (headquartered in modern Beijing) consisting of Youzhou, the core territory of the former Yan. In 768, Li Huaixian was killed by his subordinates Zhu Xicai, Zhu Ci and Zhu Tao who then took over command of the circuit. Lulong Circuit remained a semi-independent fief, survived the fragmentation of Tang until being annexed by Li Cunxu's Jin state in 913.
Li Baozhen kept control of the Chengde Circuit. His son Li Weiyue, along with Tian Chengsi's son Tian Yue, rebelled against Tang in 781 but was later killed by his officer Wang Wujun. Chengde's last ruler, Wang Rong later founded the Zhao Dynasty that lasted until 921.
Tian Chengsi had full control of the Weibo Circuit. He later annexed Xue Song's Zhaoyi Circuit. Weibo Circuit remained independent until integrated with the Later Liang state in 910.
Li Zhengji became the powerful ruler of the Pinglu Circuit (modern Tai'an, Shandong). His son Li Na rebelled and proclaimed to be the King of Qi before submitting to Tang rule. Wang Wujun also ruled Chengde Circuit as a de facto independent Kingdom of Zhao before submitting to Tang again under Emperor Dezong. Liang Chongyi seized control of the Shannan East Circuit before being defeated by Tang in 781.

## Legacy
### Death toll

— Excerpt from Yan Zhenqing's Draft of a Requiem to My Nephew about the deaths of Yan Gaoqing (Magistrate of Changshan) and Yan Jiming
Censuses taken in the half-century before the rebellion show a gradual increase in population, with the last census undertaken before the rebellion, in 755, recording a population of 52,919,309 in 8,914,709 taxpaying households. However, a census taken in 764, the year following the end of the rebellion, recorded only 16,900,000 in 2,900,000 households. Later censuses count only households, but by 855 this figure had risen to only 4,955,151 households, little over half the number recorded in 755. The difference in the census figures amounts to 36 million people less, two-thirds of the population of the empire, though scholars have attributed this to factors including a breakdown in taxation and census gathering.
The figure of 36 million was used in Steven Pinker's book The Better Angels of Our Nature, where it is presented as proportionally the largest atrocity in history with the loss of a sixth of the world's population at that time, though Pinker stated that the figure was controversial. Matthew White, from whom Pinker had taken the figure of 36 million, later revised his figure down to 13 million (based on a different calculation from the census results) in his book The Great Big Book of Horrible Things. White's revised figure is repeated by cultural historians such as Johan Norberg.
Historians such as Charles Patrick Fitzgerald argue that claims of massive depopulation are incompatible with contemporary accounts of the war, which was fought intermittently over three or four provinces. They point out that the numbers recorded on the postwar registers reflect not only population loss, but also a breakdown of accuracy of the census system as well as the removal from the census figures of various classes of untaxed persons, such as those in religious orders, foreigners and merchants. In addition, several of the northern provinces, with approximately a quarter of the empire's population, were no longer subject to the imperial revenue system. For these reasons, census numbers for the post-rebellion Tang are considered unreliable.
The An Lushan rebellion was one of several wars in northern China along with the Uprising of the Five Barbarians, Huang Chao Rebellion, the wars of the Five Dynasties and Ten Kingdoms and Jin–Song Wars which caused a mass migration of Han Chinese from northern China to southern China (衣冠南渡; yì guān nán dù). These mass migrations led to southern China's population growth, economic, agricultural and cultural development as it stayed peaceful unlike the north.

#### Massacres of foreigners

A massacre of foreign Arab and Persian Muslim merchants by former Yan rebel general Tian Shengong happened during the An Lushan rebellion in the Yangzhou massacre (760). Since Tian Shengong was defecting to the Tang dynasty and wanted them to publicly recognize and acknowledge him as a regional warlord without him giving up territory, and the Tang court portrayed the war as between rebel Hu barbarians of the Yan against Han Chinese of the Tang dynasty, Tian Shengong slaughtered foreigners as a blood sacrifice to prove he was loyal to the Han Chinese Tang dynasty state. He killed other foreign Hu barbarian ethnicities as well whose ethnic groups were not specified, not only Arabs and Persians, since it was directed against all foreigners.$^{:91,92,93}$
The former Yan rebel general Gao Juren, of Goguryeo descent, ordered a mass slaughter of West Asian (Central Asian) Sogdians in Fanyang, also known as Jicheng (Beijing), in Youzhou. They were identified through their big noses and lances were used to impale their children when he rebelled against the rebel Yan emperor Shi Chaoyi and defeated rival Yan dynasty forces under the Turk Ashina Chengqing. High nosed Sogdians were slaughtered in Youzhou in 761. Youzhou had Linzhou, another "protected" prefecture attached to it, and Sogdians lived there in great numbers.$^{:110,111}$ Gao Juren, like Tian Shengong, wanted to defect to the Tang dynasty and wanted them to publicly recognize and acknowledge him as a regional warlord, according to the book, "History of An Lushan" (安祿山史記).$^{:93,94}$ Another source says the slaughter of the Hu barbarians serving Ashina Chengqing was done by Gao Juren in Fanyang in order to deprive him of his support base, since the Tiele, Tongluo, Sogdians and Turks were all Hu and supported the Turk Ashina Chengqing against the Mohe, Xi, Khitan and Goguryeo origin soldiers led by Gao Juren. Gao Juren was later killed by Li Huaixian, who was loyal to Shi Chaoyi.

### Weakening of Tang

The rebellion of An Lushan and its aftermath greatly weakened the centralized bureaucracy of the Tang dynasty, especially in regards to its perimeters. Virtually autonomous provinces and ad hoc financial organizations arose, reducing the influence of the regular bureaucracy in Chang'an. The Tang dynasty's desire for political stability in this turbulent period also resulted in the pardoning of many rebels. Indeed, some were even given their own garrisons to command. Political and economic control of large swathes of the empire became intermittent or was lost, and these areas came to be controlled by fanzhen, autonomous regional authorities headed by the jiedushi (regional military governors). In Hebei, three fanzhen became virtually independent for the remainder of the Tang dynasty. Furthermore, the Tang government also lost most of its control over the Western Regions, due to troop withdrawal to central China to attempt to crush the rebellion and deal with subsequent disturbances. Continued military and economic weakness resulted in further subsequent erosions of Tang territorial control during the ensuing years, particularly in regard to the Tibetan empires. By 790 Chinese control over the Tarim Basin area was completely lost. Moreover, during the rebellion, the Tang general Gao Juren massacred all the Sogdians in Fanyang, who were identified through their noses and faces.
The political decline was paralleled by economic decline, including large Tang governmental debt to Uighur money lenders. The old taxation system of Zu Yong Diao no longer functioned after the rebellion. In addition to being politically and economically detrimental to the empire, the rebellion also affected the intellectual culture of the Tang dynasty. Many intellectuals had their careers interrupted, giving them time to ponder the causes of the unrest. Some lost faith in themselves, concluding that a lack of moral seriousness in intellectual culture had been the cause of the rebellion. However, a political and cultural recovery eventually did occur within Tang China several decades after the rebellion, until about 820, the year of the death of Emperor Xianzong of Tang. Much of the rebuilding and recovery occurred in the Jiangnan region in the south, which had escaped the events of the rebellion relatively unscathed and remained more firmly under Tang control. However, due in part to the jiedushi system, the Tang Empire by 907 devolved into what is known as the Five Dynasties and Ten Kingdoms period.
The Tang dynasty recovered its power decades after the An Lushan rebellion and was still able to launch offensive conquests and campaigns like its destruction of the Uyghur Khaganate in Mongolia in 840–847. The Yenisei Kyrgyz Khaganate of the Are family bolstered his ties and alliance to the Tang dynasty Imperial family against the Uyghur Khaganate by claiming descent from the Han dynasty Han Chinese general Li Ling who had defected to the Xiongnu and married a Xiongnu princess, daughter of Qiedihou Chanyu and was sent to govern the Jiankun (Ch'ien-K'un) region which later became Yenisei. Li Ling was a grandson of Li Guang (Li Kuang) of the Longxi Li family descended from Laozi which the Tang dynasty Li Imperial family claimed descent from. The Yenisei Kyrgyz and Tang dynasty launched a victorious successful war between 840–848 to destroy the Uyghur Khaganate in Mongolia and its centre at the Orkhon valley using their claimed familial ties as justification for an alliance. Tang dynasty Chinese forces under General Shi Xiong wounded the Uyghur Khagan (Qaghan) Ögä, seized livestock, took 5,000–20,000 Uyghur Khaganate soldiers captive, killed 10,000 Uyghur Khaganate soldiers on 13 February 843 at the battle of Shahu (kill the barbarians) mountain in 843.
It was the Huang Chao rebellion in 874–884 by the native Han rebel Huang Chao that permanently destroyed the power of the Tang dynasty since Huang Chao not only devastated the north but marched into southern China which An Lushan failed to do due to the Battle of Suiyang. Huang Chao's army in southern China committed the Guangzhou massacre against foreign Arab and Persian Muslim, Zoroastrian, Jewish and Christian merchants in 878–879 at the seaport and trading entrepot of Guangzhou, and captured both Tang dynasty capitals, Luoyang and Chang'an. A medieval Chinese source claimed that Huang Chao killed 8 million people. Even though Huang Chao was eventually defeated, the Tang Emperors lost all their power to regional jiedushi. Huang Chao's former lieutenant Zhu Wen, who had defected to the Tang court, turned the Tang emperors into his puppets and completed the destruction of Chang'an by dismantling Chang'an and transporting the materials east to Luoyang when he forced the court to move the capital. Zhu Wen deposed the last Tang Emperor in 907 and founded Later Liang (Five Dynasties), plunging China into the Five Dynasties and Ten Kingdoms period as regional jiedushi warlords declared their own dynasties and kingdoms.

### Cultural influence

The Tang dynasty hired 3,000 mercenaries from Abbasid territories, and the Uyghur Khaganate intervened for the Tang dynasty against An Lushan.
The Uyghur Khaganate exchanged princesses in marriage with Tang dynasty China in 756 to seal the alliance against An Lushan. The Uyghur Khagan Bayanchur Khan had his daughter Uyghur Princess Pijia (毗伽公主) married to Tang dynasty Chinese Prince Li Chengcai [zh], Prince of Dunhuang (敦煌王), son of Li Shouli, Prince of Bin, while the Tang dynasty Chinese princess Ninguo married Uyghur Khagan Bayanchur.
Sogdian merchants continued as active traders in China following the defeat of the rebellion, but many of them were compelled to hide their ethnic identity. A prominent case was An Chongzhang, Minister of War and Duke of Liang, who in 756 requested of Emperor Suzong to allow him to change his name to Li Baoyu, due to his shame in sharing the same surname with the rebel leader. This change of surnames was enacted retroactively for all of his family members, so that his ancestors would also be bestowed the surname Li.
The events involved in the An Lushan rebellion had an immense cultural influence both in China and beyond. Many poets of the time wrote about their lives and emotions, which were deeply impacted by war and rebellion, but few poets wrote outwardly about the rebellion. In fact, only eighteen of around one hundred poems produced between the years of 755 and 763 discussed the rebellion. Although the majority of poems written at the time simply do not mention the rebellion, a few poets attempted to write openly about their experiences living during the rebellion. Some examples of this include:
* The great poet Li Bai (also known as "Li Bo" or "Li Po", who lived about 701–762) avoided the rebels, but at the cost of getting involved on the wrong side of a power struggle between the princes of the royal family. He was convicted of involvement with rebellion and sentenced to exile, although he was later reprieved. His surviving poems reflect the golden days before the An Lushan rebellion, his lengthy and deliberately protracted journey toward exile (and then return as in his poem "Departing from Baidi in the Morning", together with his hardships, wandering and disillusionment as the Tang re-consolidated control after the rebellion. He died in 762, before the final defeat of the rebel forces a year later.
* Li Bai's colleague Du Fu (712–770) had finally attained a minor appointment in the imperial bureaucracy when the rebellion broke out. He spent the winter of 756 and the summer of 757 as a captive in rebel-occupied Chang'an, but later managed to escape and join with Suzong's side and thus avoid charges of treason. Living until 770, his subsequent poetry is a primary source of information about the massive upheavals of the period.
* Wang Changling (698–756?), was another Tang official and renowned poet who died in the rebellion, in about 756.
* Wang Wei (approximately 699–759) was captured by the rebels in 756 and sent to Luoyang, where he was forced to serve as an official in their governmental administration, for which he was briefly imprisoned after his capture by loyalist forces. Dying before the end of the rebellion, somewhere between 759 and 761, Wang Wei lived his last years in retirement at his country home in Lantian, secluded in the hills.
* Wei Yingwu (737–792) of Three Hundred Tang Poems fame is credited with writing the poem "At Chuzhou on the Western Stream", apparently written in response to the seemingly helmless ship of state of the times.
Later poets, such as Bai Juyi (772–846), also wrote famous verses about the events of the period of the Anshi affairs. The tragic events were epitomized in the story of Xuanzong and Yang Guifei, and generations of Chinese and Japanese painters depicted various iconic scenes, such as Yang Guifei bathing or playing a musical instrument or the flight of the imperial court on the "hard road to Shu" (that is, the royal progress to Sichuan). These artistic themes were also a major source of inspiration in Japan, in regards to the Tale of Genji, partially inspired by the story of Yang Guifei.