Emperor Tang Daizong 唐代宗李豫 , born Li Chu ; in 758 he renamed himself Li Yu . He was the eighth emperor of the Tang dynasty and reigned from the fifth month of 762 to the fifth month of 779. He was the son of Emperor Suzong. During the An Lushan Rebellion, he acted as a general and was the representative of the royal family at the two capitals . At the beginning of his reign, general prefect-king of Fenyang Guo Ziyi successfully quelled the Anshi Rebellion, which had plagued the dynasty for over seven years. In 763, while both Daizong and Guo were in Luoyang, Tibetan forces suddenly occupied the capital of Chang'an. The Tibetan forces were, however, defeated within a few days.
Other notable events during Daizong's reign included a plot by a corrupt eunuch named Li Fuguo to gain control of the administration by murdering Daizong's stepmother. Li subsequently tried to confine Daizong to the palace while he controlled affairs of state. Daizong realized Li's motives and had Li assassinated along with numerous other corrupt eunuchs. Daizong was a devout and spent huge sums of money on building temples and shrines. Later this would prove to be a financial burden for the empire and hastened the decline of the dynasty.