By 736, An Lushan was already a general of the Guards. He suffered a disastrous loss in suppressing a Khitan ‘rebellion’ that year and should have faced death by court-martial. But when the case was reported to the throne, Emperor Xuanzong overruled the Prime Minister and pardoned him.
An Lushan advanced steadily to the position of military commissioner in 744. He won the trust of Emperor Xuanzong, who enjoyed the immensely fat general’s performances of the ‘Sogdian Whirling Dance’. In addition to other imperial favours, An Lushan was enfeoffed in 750 with the rank of Commandery Prince.
An Lushan painstakingly built up a power base. His command eventually covered all three military regions in the northeast, stretching from Shanxi to Manchuria, with headquarters at Fanyang, near modern Beijing. On 16 December 755, he launched a long-planned rebellion. His troops, numbering more than 100000, swept, almost unopposed, through the Central Plains to Luoyang, the Tang’s Eastern Capital, which fell in only thirty-four days.
At Chinese New Year (5 February) in 756, An Lushan formally enthroned himself as the emperor of a new dynasty called Great Yan at Luoyang. A large number of former Tang courtiers and officials swore allegiance. Several month later, the rebel troops routed the Tang force guarding the pass that led to the main capital, Chang’an. This defeat forced the Tang imperial house to fee Chang’an for the distant southwest and led to the death of the emperor’s favourite, plump concubine Yang Guifei.