Excerpts from Books and Wikipedia
"The An Lushan Rebellion was a devastating rebellion against the Tang dynasty of China. The rebellion overtly began on 16 December 755, when general An Lushan declared himself emperor in Northern China, thus establishing a rival Yan Dynasty, and ended when Yan fell on 17 February 763 . . . The rebellion spanned the reigns of three Tang emperors before it was finally quashed, and involved a wide range of regional powers. Besides the Tang dynasty loyalists, others involved were anti-Tang forces, especially those in An Lushan's base area in Hebei and Sogdian forces or influences, among others. The rebellion and subsequent disorder resulted in a huge loss of life and large-scale destruction. It significantly weakened the Tang dynasty and led to the loss of the Western Regions. The Tang dynasty hired 4,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." [Wikipedia]