The third Chinese domination refers to the time in Vietnam from the end of the Anterior Lý Dynasty in 602 to the rise of the Khúc family by Khúc Thừa Dụ in 905 or until 938, following the expulsion of the Southern Han invaders by Ngô Quyền. This period saw two Chinese imperial dynasties rule over an area of northern Vietnam roughly corresponding to the modern Hanoi region. From 602–618, this area was under the late Sui Dynasty, under three districts in the Red River Delta. From 618 to 905, the Tang Dynasty became the new Chinese rulers of Vietnam.
During this time, Vietnam was known as:
The Tang Dynasty quelled three revolts in northern Vietnam between 722 and 728, using an army of natives pressed into service under the leadership of Chinese generals. The generals were particularly brutal in suppressing the insurrection: one ordered the decapitated bodies of 80,000 scalped and flayed rebels stacked into a pyramid. Although Chinese governors were sent to rule over Annam, a series of local emperors were unofficial rulers under Chinese control:
Nanzhao invaded the area of Jiaozhi modern day Vietnam multiple times in the 9th century until the Cao Bian (Cao Biền) was ordered by the Tang dynasty to defeat Nanzhao and restored Tang rule to Jiaozhou.
Taking advantage of the disturbances in the Tang Empire, a notable from Cuc Bo (in the present-day Hải Dương Province), Khúc Thừa Dụ, made himself Jiedushi (military governor) in 905, and in 906 the Tang court had to recognize this fait accompli. Khúc Thừa Dụ was a rich man who was admired by people, and he pushed out the Tang from the region, but later worked with the Tang to establish himself as the first local self-appointed governor who ended the practice of governors sent by the Imperial court from other regions.