Emperor Xuanzong of Tang, personal name Li Longji, was an emperor of the Tang dynasty of China, reigning from 712 to 756. His reign of 44 years was the longest of the Tang dynasty. He seized the throne through two palace coups and inherited an empire still in its golden age. Early in his rule he was assisted by capable chancellors, but his later reliance on figures such as Li Linfu, Yang Guozhong and the general An Lushan contributed to a sharp decline, and the golden age ended in the An Lushan rebellion.
Early life and rise






Li Longji was born in 685 at the eastern capital Luoyang, during the first reign of his father Emperor Ruizong, while real power rested with Empress Dowager Wu, later known as Wu Zetian. As a young man he was described as handsome and talented in music. Under Wu Zetian and later Emperor Zhongzong he lived under restriction and gradually built ties with imperial guard commanders. Fearing the influence of Empress Wei, he prepared to act against her.
Coups and succession






In 710, after Emperor Zhongzong died in circumstances that traditional historians attributed to poisoning by Empress Wei, Li Longji joined with Princess Taiping and guard officers to attack the palace. Empress Wei was killed, and Li Longji's father Li Dan was restored as Emperor Ruizong. Disputes over the succession followed, and Li Longji's accomplishments made him a strong candidate for the position of crown prince.
