he failed to get widespread support from the other Yan generals. 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. The end of the rebellion was a long process of rebuilding and recovery. Due to the Imperial Court's weakened condition, other disturbances flared up. The Tibetan Empire under Trisong Detsän, taking advantage of the Tang's weakness, had reconquered much of its Central Asian territories, and proceeded to capture Chang'an on 18 November 763 before withdrawing back to the borders of its empire. Massacres of Hu people A massacre of foreign Arab and Persian Muslim merchants by former Yan rebel general Tian Shengong happened during the An Lushan rebellion in the Yangzhou massacre (760), since Tian Shengong was defecting to the Tang dynasty and wanted them to publicly recognize and acknowledge him, and the Tang court portrayed the war as between rebel Hu barbarians of the Yan against Han Chinese of the Tang dynasty, Tian Shengong slaughtered foreigners as a blood sacrifice to prove he was loyal to the Han Chinese Tang dynasty state and for them to recognize him as a regional warlord without him giving up territory, and he killed other foreign Hu barbarian ethnicities as well whose ethnic groups were not specified, not only Arabs and Persians since it was directed against all foreigners. The former Yan rebel general Gao Juren of Goguryeo descent ordered a mass slaughter of West Asian (Central Asian) Sogdians in Fanyang, also known