population levels were not affected until after the middle of the second century. While enough immigrants existed to form a coherent Han-Viet ruling-class, not enough existed to administratively or culturally dominate the indigenous society. In fact, it appears that "imperial law was never successfully imposed over the Vietnamese, and that during the post-Han era of the Six Dynasties, enfeebled imperial courts were repeatedly forced to compromise their authority and recognize the local power system in Vietnam". Meanwhile, Han colonial officials and settlers found themselves adopting local customs. A Giao Chỉ prefect, Shi Xie, who was in the sixth generation from his ancestors who migrated to Northern Vietnam during the Wang Mang era, ruled Vietnam as an autonomous warlord for forty years and was posthumously deified by later Vietnamese monarchs. In the words of Stephen O'Harrow, Shi Xie was essentially "the first Vietnamese." His rule gave "formal legitimacy" to those identifying with interests of the local society than with the Chinese empire. And while the Chinese saw Shi Xie as "frontier guardian", the Vietnamese considered him the head of regional ruling-class society. According to Taylor (1983): A revolt against China was mounted by Ly Bon, whose ancestors were also among the Chinese who fled south to escape the disorders of Wang Mang's usurpation, in the fifth century. Attempts to civilize the Vietnamese were failed and there was more 'Vietnamization' of Chinese of Vietnamese ancestry than assimilation of the Vietnamese in the first six centuries of Chinese rule. The Chinese of Vietnamese ancestry became assimilated while still maintaining their Chinese identity with the native people and absorbed into the "social, economic and political environment" in Northern Vietnam. The insight, skills, customs, and ideas brought in by the Chinese allowed the native to develop an identity, making the probability of their being assimilated to Chinese and Chinese intrusion lower. The strength of localization in ancient Vietnam has thus been widely noted. The policy of assimilation was continually enforced over the 1,000 years of Chinese rule of Vietnam until the Ngô dynasty when the Vietnamese regained their independence from China. The Vietnamese rulers deported some 87,000 Chinese nationals, although a smaller minority applied for permanent residency in Vietnam. Chinese who chose to remain in Vietnam chose to assimilate. The Vietnamese were wedded with Chinese peasantry that later became gentry of Vietnam. After independence Sporadic Chinese migration into Vietnam continued between the 9th and 15th