China and Vietnam had contact since the Chinese Warring States period and the Vietnamese Thục Dynasty in the 3rd century BC, as noted in the 15th-century Vietnamese historical record Đại Việt sử ký toàn thư.
Between the 1st century BC and the 15th century AD, Vietnam was subject to four separate periods of imperial Chinese domination although it successfully asserted a degree of independence after the Battle of Bạch Đằng in 938 AD.

According to the old Vietnamese historical records Đại Việt sử ký toàn thư and Khâm Định Việt Sử Thông Giám Cương Mục, An Dương Vương (Thục Phán) was a prince of the Chinese state of Shu (蜀, which shares the same Chinese character as his surname Thục), sent by his father first to explore what are now the southern Chinese provinces of Guangxi and Yunnan and then to move their people to what is now northern Vietnam during the invasion of the Qin dynasty.

Some modern Vietnamese scholars believe that Thục Phán came upon Âu Việt, which is now northernmost Vietnam, western Guangdong, and southern Guangxi Province, with its capital in what is today Cao Bằng Province).
After assembling an army, he defeated King Hùng Vương XVIII, the last ruler of the Hồng Bàng Dynasty, in 258 BC.
He proclaimed himself An Dương Vương ("King An Dương"), renamed his newly acquired state from Văn Lang to Âu Lạc and established the new capital at Phong Khê (now Phú Thọ, a town in northern Vietnam), where he tried to build Cổ Loa Citadel, the spiral fortress approximately ten miles north of his new capital.

Han Chinese migration into Vietnam has been dated back to the era of the 2nd century BC, when Qin Shi Huang first placed northern Vietnam under Chinese rule, Chinese soldiers and fugitives from Central China have migrated en masse into northern Vietnam since then and introduced Chinese influences into Vietnamese culture.
The Chinese military leader Zhao Tuo founded the Triệu dynasty, which ruled Nanyue in southern China and northern Vietnam.
The Qin governor of Canton advised Zhao to found his own independent kingdom since the area was remote, and there were many Chinese settlers in the area.
The Chinese prefect of Jiaozhi, Shi Xie, ruled Vietnam as an autonomous warlord and was posthumously defied by later Vietnamese emperors.
Shi Xie was the leader of the elite ruling class of Han Chinese families that immigrated to Vietnam and played a major role in developing Vietnam's culture.
China and Vietnam had contact since the Chinese Warring States period and the Vietnamese Thục Dynasty in the 3rd century BC, as noted in the 15th-century Vietnamese historical record Đại Việt sử ký toàn thư. Between the 1st century BC and the 15th century AD, Vietnam was subject to four separate periods of imperial Chinese domination although it successfully asserted a degree of independence after the Battle of Bạch Đằng in 938 AD.
According to the old Vietnamese historical records Đại Việt sử ký toàn thư and Khâm Định Việt Sử Thông Giám Cương Mục, An Dương Vương (Thục Phán) was a prince of the Chinese state of Shu (蜀, which shares the same Chinese character as his surname Thục), sent by his father first to explore what are now the southern Chinese provinces of Guangxi and Yunnan and then to move their people to what is now northern Vietnam during the invasion of the Qin dynasty.
Some modern Vietnamese scholars believe that Thục Phán came upon Âu Việt, which is now northernmost Vietnam, western Guangdong, and southern Guangxi Province, with its capital in what is today Cao Bằng Province). After assembling an army, he defeated King Hùng Vương XVIII, the last ruler of the Hồng Bàng Dynasty, in 258 BC. He proclaimed himself An Dương Vương ("King An Dương"), renamed his newly acquired state from Văn Lang to Âu Lạc and established the new capital at Phong Khê (now Phú Thọ, a town in northern Vietnam), where he tried to build Cổ Loa Citadel, the spiral fortress approximately ten miles north of his new capital.
Han Chinese migration into Vietnam has been dated back to the era of the 2nd century BC, when Qin Shi Huang first placed northern Vietnam under Chinese rule, Chinese soldiers and fugitives from Central China have migrated en masse into northern Vietnam since then and introduced Chinese influences into Vietnamese culture. The Chinese military leader Zhao Tuo founded the Triệu dynasty, which ruled Nanyue in southern China and northern Vietnam. The Qin governor of Canton advised Zhao to found his own independent kingdom since the area was remote, and there were many Chinese settlers in the area. The Chinese prefect of Jiaozhi, Shi Xie, ruled Vietnam as an autonomous warlord and was posthumously defied by later Vietnamese emperors. Shi Xie was the leader of the elite ruling class of Han Chinese families that immigrated to Vietnam and played a major role in developing Vietnam's culture.
China–Vietnam relations