In 214 B.C.E. the newly unified Qin empire of China sent a military expedition south to conquer northern Vietnam. The ruler there, fearing devastation, submitted to the Qin, and the north was divided into three commandaries, much like Korea was under the Han. With the decline of the Qin, the governor of one commandery in 208 B.C.E. conquered Au Lac and renamed the new entity under him Nam Viêt. During the Han dynasty, Nam Viêt became part of the Chinese tributary system. This relationship continued through the end of the 2nd century B.C.E., but in 111 B.C.E. Chinese troops attacked and captured Nam Viêt on the order of Emperor Wu of the Han. The country was renamed Giao-chi (Jiaozhi in Chinese) and was incorporated into the Han empire. There it remained for more than a millennium.
[...]
When China was reunified under the Sui and Tang dynasties, Vietnam fell again under Chinese control. The Tang set up the Protectorate of An-nam (literally, the ?pacified south?) in the northern part of the country in the 7th and 8th centuries, typical of Chinese regional control structures at the time. When the central control of the Tang waned in the 9th century, control in the extremities waned as well and gave rise to instability. During the Tang, the political center of what was then Vietnam became Hanoi.
von:
http://www.bartleby.com/67/397.html...