 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.This began when the king of Early Lý dynasty (Lý Nam Đế II) surrendered to Emperor Wen of Sui in Sui–Former Lý War until Khúc clan seized the capital Đại La and install the autonomous state in Vietnam in 905.