Yandi
By 762, Emperor Suzong had become seriously ill; and the combined forces of the Tang and their Huige allies were led by his eldest son. This son, first named Li Chu, was renamed Li Yu in 758, after being named crown prince. On 18 May 762, on the death of his father, he became Emperor Daizong of Tang. In the period before his final victory over the rebels, he was confronted with several threats; for example, in 758, the port of Canton was pillaged by sea-borne Arabs and Persians, probably pirates based out of Hainan. But, by this time it was clear that the new Yan Dynasty would not last and Yan officers and soldiers began to defect to the Tang side. Then, in the winter of 762, the eastern capital Luoyang was retaken by Tang forces for the second time. Yan Emperor Shi Chaoyi attempted to flee, but was intercepted early in 763. Shi Chaoyi chose suicide over capture, dying on 17 February 763, ending the eight-year-long rebellion.