In 762 Emperor Suzong had become seriously ill . The combined forces of the Tang and their Huige allies were led by the eldest son of Suzong . This son was at first named Li Chu , then renamed Li Yu in 758 , after being named crown prince ; eventually he was renamed again as Emperor Daizong of Tang , on 18 May 762 . In the period before his final victories over the rebel troops he was also confronted with a wide variety of threats ; for example , the port of Canton was pillaged in 758 by sea-borne Arab and Persian forces , probably pirates based out of Hainan . There was also a massacre of Arab and Persian merchants in the Yangzhou massacre ( 760 ) . However , by this time it was clear that the new Yan Dynasty would not last long , and Yan officers and soldiers began to defect to the Tang side . Finally , the eastern capital Luoyang was taken by Tang forces for the second time , in the winter of 762 . Yan Emperor Shi Chaoyi attempted to flee , but was intercepted in the spring of 763 . Shi Chaoyi then chose suicide to avoid capture . Thus , after eight years , the rebellion ended
Yangzhou massacre ( 760 )
Yangzhou massacre (760)
An Lushan Rebellion