centuries AD. The Vietnamese court during the Lý dynasty and the Trần dynasty welcomed ethnic Chinese scholars and officials to fill into its administrative and bureaucratic ranks, but these migrants had to renounce their Chinese identity and assimilate into Vietnamese society. The Vietnamese court also allowed Chinese refugees, which consisted of civilian and military officials with their family members to seek asylum in Vietnam. However, these Chinese settlers were not allowed to change their place of residence without the Court's permission and were also required to adopt Vietnamese dress and culture. During the Early Lê dynasty some Chinese were captured in 995 after the Vietnamese raided the border. During the Lý dynastyVietnam raided Song dynasty China to enslave Chinese, who were forced to serve in the Vietnamese army as soldiers. In 1050, the Cham dedicated some Chinese slaves to their goddess Lady Po Nagar at the Po Nagar temple complex, along with Thai, Khmer and Burmese slaves. It has been speculated by Professor Kenneth Hall that these slaves were war captives taken by the Cham from the port of Panduranga after the Cham conquered the port and enslaved all of its inhabitants, including foreigners living there. In the South, the Daoyi Zhilue also mentioned Chinese merchants who went to Cham ports in Champa, married Cham women, to whom they regularly returned to after trading voyages. One notable example of such intermarriages was Chinese merchant from Quanzhou, Wang Yuanmao, who in the 12th century traded extensively with Champa and married a Cham princess. Chinese prisoners were returned to China for captured districts in 1078 after China defeated Đại Việt and overran several of Cao Bằng Province's districts. The founder of the Lý dynasty, Lý Thái Tổ (Lý Công Uẩn) 李公蘊, has been ascribed of having origins from Fujian Province somewhere in his paternal bloodline while little is known about his maternal side except for the fact that his mother was a woman named Phạm Thị. Very few direct details about his parents are known, however, the ethnic Chinese background of Lý Công Uẩn (李公蘊 [Hokkien POJ: Lí kong ùn]), at least on his paternal side has been accepted by Vietnamese historian Trần Quốc Vượng. The ancestors of the Trần clan originated from the province of Fujian before they migrated under Trần Kinh (陳京, [Hokkien POJ: Tân Kiaⁿ / King]) to Đại Việt, where their mixed-blooded descendants established the Trần dynasty which