An Lushan (; 20th day of the 1st monthVolume 216 of Zizhi Tongjian recorded a birthday celebration for An on the jiachen day of the 1st month, during the 10th year of the Tianbao era of Tang Xuanzong's reign (751). For that month, the jiachen day corresponds to the 20th day of the month. [(天宝十年正月)甲辰,禄山生日,...]. However, according to An Lushan Shiji (安祿山事跡) by Tang official Yao Runeng (姚汝能), An's birthday was on the 1st day of the 1st month. (19 February) 703 – 29 January 757) was a Chinese military general and rebel leader during the Tang dynasty and is primarily known for instigating the An Lushan rebellion which devastated China and killed millions of Han Chinese. The rebellion caused the decline of the Tang dynasty and led to the sacking of Chang'an by the Tibetan Empire. An Lushan was born to a Sogdian father and Turkic mother,Yang, Zhijiu, "An Lushan". Encyclopedia of China (Chinese History Edition), 1st ed.Lin, Tianwei An Lushan profile , Chinese Encyclopedia (Biography Edition; 1st ed.); accessed 3 August 2011.Zhong, Han. "Ah Lushan Dengzahu De Neiya Wenhua Beijing" ("The Cultural Background on An Lushan, etc in Inner Asia — With the Discussion on the Inner Asia-ized of Sute or Sogdian"). Journal of Chinese Historical Studies (2005); at least by adoption.Beckwith, p. 21, n. 82 He rose to prominence as a general by defending the northeastern Tang frontier from the Khitans and other threats. Through his frequent visits to Chang'an, the Tang capital, An Lushan managed to gain favour with Emperor Xuanzong of Tang and Chancellor Li Linfu. By 751, he had been appointed military governor over three prefectures. After the death of Li Linfu in 753, An Lushan's rivalry with General Geshu Han and Chancellor Yang Guozhong created military tensions within the empire.

In late 755, An Lushan instigated open revolt and quickly captured Luoyang, the eastern capital, where in early 756 he proclaimed himself emperor of the new Yan dynasty. While his generals continued his campaigns, An Lushan remained in the Luoyang palace; his health failed and he became increasingly violent and paranoid. In early 757 he was murdered by a eunuch with the support of his son, An Qingxu.

Background and name An Lushan's mother was a Göktürk of the Ashide clan and served as a sorceress. According to historical sources, his original name might have been Aluoshan or Yaluoshan, the latter stated in the Old Book of Tang to mean "war" in Old Turkic. His father died early, and his mother Lady Ashide married a Turkic general An Yanyan (), who was a brother of general An Bozhi (). An Lushan, therefore, took the surname An. Early in Emperor Xuanzong of Tang's Kaiyuan era, 713–741, there was a disturbance among the Göktürk tribe that An Yanyan belonged to, and he fled to Tang with his stepson An Lushan and nephew An Sishun. An Lushan later settled in Ying Prefecture (營州, roughly modern Chaoyang, Liaoning).

Paternity Sources conflict about An Lushan's biological father's origin and surname; for example, whether An Lushan's father had the surname Kang or not: he took the name of An from his Göktürk stepfather An Yanyan. The surnames Kang and An suggest that they were respectively from the Sogdian kingdoms of Samarkand (康國; cf. Kangju) and Bukhara ().Yang, Zhijiu, An Lushan profile.Xue, Zongzheng (1992). A History of the Turks, pp. 329, 602–606. Beijing: Chinese Social Sciences Press; .Mu, Weisheng (2000). The Critical Biography of Guo Ziyi, p. 54; .Ebrey, Walthall, Palais (2006). Encyclopedia of China (Chinese History Edition), 1st ed. The An are not to be confused with Anxi, which had been established as a prefecture by the Chinese in 661.Yu Taishan (2nd Edition 2003). A Comprehensive History of Western Regions, p. 169. Zhengzhou: Zhongzhou Guji Press; .

On his side, Matsui Hitoshi, noting that nothing in the historical records provides hard evidence of Sogdian origin and that An Lushan was living at Yingzhou, a settlement of Kumo Xi and Khitan people, suggests that "Perhaps [An Lushan's father] might have been of Khitan origin."Xu Elina-Qian, p. 248Matsui 1981. Repr. in: Sun, Jinji et al. 1988 (vol. 1), p. 105. Edward H. Schafer, however, maintains that An Lushan is probably the Sinicized version of a name derived from Anxi (安息 "Parthia(n)") and the common Sogdian name ܪܘܚܫܐܢ Roxshan "the Bright"according to Edwin G. Pulleyblank (Schafer, p. 4)Schafer, p. 9or "the luminous", Beckwith, p. 145, n. 18 related to the Sogdian female name Roxana, also borne by Alexander's Sogdian wife, Roxana.Edward H. Schafer's The Golden Peaches of Samarkand: A Study of T'ang Exotics; University of California Press, 1985 His name has also been transcribed as Āluòshān ()Zizhi Tongjian, vol. 214. or Yàluòshān (),Old Book of Tang, vol. 200, part 1 .New Book of Tang, vol. 225, part 1 .An Lushan's biography in the New Book of Tang, in addition to indicating that his original name was Galuoshan, also indicated that his original surname was Kang, implying that his father was surnamed Kang. However, his biography in the Old Book of Tang indicated that An Lushan "originally did not have a surname." Compare Old Book of Tang, vol. 200, part 1, with New Book of Tang, vol. 225, part 1. and he was posthumously named Prince La of Yan () by his deputy Shi Siming.

Youth It was said that An Lushan knew six non-Chinese languages, and, after he grew older, served as an interpreter in one of the military markets, which were set up by the Chinese government largely to obtain horses in exchange for silk through foreign trade. Serving with him was Shi Sugan (later named Shi Siming), who was one day older than he was and who became a good friend of his. In 732, when the general Zhang Shougui () was governing You Prefecture (幽州, roughly modern Beijing), it was discovered that An Lushan had stolen sheep. Zhang was set to execute An Lushan by caning, when An Lushan yelled out, "Is it that you, Lord, do not wish to destroy the two barbarian tribes?I.e., the Khitan and the Xi (奚). Why do you want to cane An Lushan to death?" Zhang, seeing that he had a large body and impressed by his plea, released him and had him serve as a police officer, along with Shi, and both of them were said to be capable at catching criminals. Later, Zhang promoted him to be a military officer. As Zhang believed that he was obese, he did not dare to eat too much while in Zhang's presence, and this drew Zhang's favor. Zhang took him in and treated him like a son. At a time that was not recorded in history, he married a Lady Kang as his first wife; they had at least one son, An Qingxu, who, however, was not his oldest son.

Service in Tang armies

Rise through the ranks (736–742)

By 736, An Lushan carried a general title and was serving under Zhang Shougui as an officer of the Pinglu Army (平盧軍, based in modern Chaoyang). In 736, after An disobeyed Zhang's orders and made an overly aggressive attack against the Khitan and the Xi, he was defeated. According to army regulations, he was supposed to be executed. Zhang then sent him to the capital, Chang'an; by not executing An himself, Zhang was hoping that Emperor Xuanzong would pardon An.(守圭亦惜其骁勇,欲活之,乃更执送京师。) The chancellor Zhang Jiuling, arguing that An's death would be necessary to preserve military discipline and further believing that An had the appearance of a rebel, advocated An's death, but Emperor Xuanzong believed An to be able and did not want to execute him, and therefore spared him but stripped him of titles, returning him to serve under Zhang.

In 740, An became the Bingmashi () of Pinglu Army. In 741, when the deputy chief imperial censor Zhang Lizhen () was sent to survey the Hebei (河北, i.e., the region north of the Yellow River) and visited Pinglu Army, An ingratiated himself with Zhang, so much so that he even bribed Zhang's servants. When Zhang returned to Chang'an and praised An, Emperor Xuanzong promoted An to be the commandant at Ying Prefecture and the commander of Pinglu Army, to defend against the Khitan, the Xi, Balhae, and the Heishui Mohe. In 742, Xuanzong further promoted Pinglu Army to be a military circuit, making An its military governor (jiedushi).Zizhi Tongjian, vol. 215.

At Chang'an (743) In 743, An visited Chang'an to pay homage to Emperor Xuanzong. Emperor Xuanzong treated him well and allowed him to visit the palace at all times. He began to inject himself into court politics—as the official Su Xiaoyun () complained to him that the imperial examinations that year was unfair and that Zhang Shi (), the son of the deputy chief imperial censor Zhang Yi (), had been given top grade despite having no abilities. An reported this to Emperor Xuanzong, who ordered a retesting before him personally. Zhang Shi was not able to even write one character in response to Emperor Xuanzong's reexamination. As a result, the deputy ministers of civil service, Song Yao () and Miao Jinqing were demoted.

An often pleased Emperor Xuanzong by offering Emperor Xuanzong tributes of rare items, such as rare animals or jewels. By this time, he was even more obese than before, and Emperor Xuanzong, on one occasion, jokingly asked him, "What does this barbaric belly contain?" He responded, "Other than a faithful heart, there is nothing else." On another occasion, when Emperor Xuanzong's son Li Heng the Crown Prince was in audience, he refused to bow to Li Heng, stating, "I am a barbarian, and I do not understand formal ceremony. What is a crown prince?" Emperor Xuanzong responded, "He is the reserve emperor. After my death, he will be your emperor." An apologized, stating, "I am foolish. I had only known about Your Imperial Majesty, and not that there is such a thing as a reserve emperor." He bowed, but Emperor Xuanzong, believing him to be honest, favored him even more. As he was allowed to enter the palace, he asked that he become an adoptive son of Emperor Xuanzong's favorite concubine Consort Yang Guifei, and Emperor Xuanzong agreed. Thereafter, on one occasion, he bowed to Consort Yang first before bowing to Emperor Xuanzong, stating, "Barbarians bow to mothers first before fathers." Xuanzong, now believing An was as submissive to him as a son to a father, showed him even greater favors.

Return to the north front

In 744, with further praises from the powerful chancellor Li Linfu and Pei Kuan, An was, in addition to Pinglu, made the military governor of Fanyang Circuit (范陽, headquartered in modern Beijing). Wanting to show his military abilities, he often pillaged the Khitan and the Xi. His actions led to two princesses of the royal clan, who were married to Khitan and Xi leaders as part of the heqin policy, being executed in retaliation, and both groups rebelled in 745, though An defeated them.

According to the Song dynasty historian Sima Guang, it was said that An was attempting to increase his own strength and planning a rebellion, and in 747, he claimed to be building Fort Xiongwu () and asked fellow military governor Wang Zhongsi to contribute troops, hoping to hold onto the troops that Wang would send and not return them. Wang, instead, led the troops himself to Xiongwu in advance of the rendezvous date and, after participating in the building project, returned with the soldiers, and submitted reports to Emperor Xuanzong that he believed An was planning treason. Li Linfu, who was at this point apprehensive of Wang as a potential rival, used this as one of the reasons to indict Wang, and Wang was, later in 747, removed from his post. Also in 747, An Lushan was given the honorary title as chief deputy imperial censor (御史大夫, Yùshǐ Dàfū), and Lady Duan, now described as his wife, although Lady Kang was still alive, was created a lady.

In 748, Emperor Xuanzong awarded An Lushan an iron certificate promising that he would not be executed, except for treason, and in 750, he created A Prince of Dongping, setting a precedent for generals not of the imperial Li clan to be created princes.

New period in Chang'an