At the beginning of the Tang Dynasty, Vietnam had the general office of Jiaozhou. It was renamed the Governor's Office in 624 and the Governor's Office in Annan in 679. From then on, Jiaozhou was officially called Annan (as early as the Three Kingdoms period, Sun Quan of the State of Wu appointed Lv Dai as General Annan). The address of Annan Dufu is in present-day Hanoi, and the secretariat of Jiaozhou is Dufu. In the second year of Zhide [757], it was renamed Zhennan Hudu House. In the second year of Yongtai [766], it was changed to Annan Duhu. Its jurisdiction extends to Honghe and Wenshan autonomous prefectures in Yunnan in the north, to the borders of Hejing and Guangping in Vietnam in the south, and to the borders of Napo, Jingxi, Longzhou, Ningyin and Fangcheng in Guangxi in the east.
After Tianbao, Yunnan gradually entered Nanzhao, roughly bounded by the border between China and Vietnam between Kaicheng and the Middle Ages.
In the first year of Xian Tong [86 1. 1], Fu Cha was captured by Nanzhao and never recovered. In four years [863], he was trapped again and sent to Haimen Town [now north of Anyang County, Haiphong Province, Vietnam]. Seven years to restore and restore the old rule; Set up a time ambassador for the static navy, and let our time ambassador take charge of all the guards.
At the beginning of the Five Dynasties, the local governor served as our envoy, and the ministers belonged to Nanhan. The southern part of Guangxi is now owned by the Southern Han Dynasty, which is roughly bounded by the border between Guangxi Zhuang Autonomous Region and Vietnam. In 939, Wu Quan set out to defeat Nan Han and abandoned it.