The Second Era of Northern Domination refers to the second period of Chinese rule in Vietnamese history, from the 1st century to 6th century AD, during which present-day northern Vietnam (Jiaozhi) was governed by various Chinese dynasties. This period began when the Han dynasty reconquered Giao Chỉ (Jiaozhi) from the Trưng Sisters and ended in 544 AD when Lý Bí revolted against the Liang dynasty and established the Early Lý dynasty. This period lasted about 500 years.

History Eastern Han dynasty After suppressing the Trưng sisters in 43 AD, Ma Yuan continued his crackdown on the Lac Viet resistance and their society. Lac lords who had joined the Trung sisters, who had submitted or surrendered to Ma Yuan would be spared, those who disobeyed were beheaded. Direct imperial government now was imposed on the region for the first time, and Ma Yuan was appointed as Jiaozhi's governor. Some of 20,000 Chinese soldiers had settled in northern Vietnam to help rebuild the Han administration, living along with around 900,000 local people. By the second and third century, local sites and artifacts often contain both Yue and Han styles, include Han-style tomb bricks and Dong Son artifacts such as bronze drums. Evidence from early Chinese loanwords in Vietnamese suggests that Chinese household and agricultural objects, Chinese-style marriage and burial practices, practices of literacy, Iron-Age metals, and aspects of other Chinese-style cultural domains were introduced into indigenous society in the Eastern Han era or earlier. Although the Yue had adjusted local cultures, the Han Chinese didn't force the locals to adopt Chinese customs. From the Han to the Tang era, Imperial Chinese had supported for the political alliances with the locally based Yue political elite, many of which were powerful and wealthy chieftains. The Chinese court often gave them official positions in order to extract profits from them.

After governing Jiaozhi for 3 years, Ma Yuan was recalled in the year 45. During emperor Ming era, Rinan then Jiuzhen were governed by Li Shan who was well known for his benevolent rule. Li Shan was then appointed governor of Jiuzhen, while the governorship of Jiaozhi was succeeded by Zhang Hui. Zhang Hui was later prosecuted for corruption and expelled. His property was confiscated and transferred to the state treasury. Although the exact date is not clearly stated, it can be inferred from the historical source An Nam Chí Lược that Hu Gong succeeded Zhang Hui as governor of Jiaozhi, during the reign of emperor Zhang. However Hu Gong assumed the position of commandant of Jiaozhi (Vietnamese: Đô úy Giao Chỉ), instead of governor. Historical source such as An Nam Chí Lược and Đại Việt sử ký toàn thư contain no records about Jiaozhi from the reign of emperor Zhang in 75 AD to the 130s AD under emperor Shun. However, based on Việt Nam: a history from earliest time to the present, in 100, Cham people in Xianglin (Tượng Lâm) county (near modern-day Huế) revolted against the Han rule due to high taxes. The Cham plundered and burned down the Han centers. The Han respond by putting down the rebellion, executed their leaders and granting Xianglin a two-year tax respite.

In 136, Jiaozhi sitting governor Zhou Chang requested the emperor to classify Jiaozhi as a town, but the request was rejected. Zhou Chang was then appointed as Jiaozhou provincial governor (Vietnamese: Thứ sử Giao Châu), with authority over all its districts. Historical source such as An Nam Chí Lược and Đại Việt sử ký toàn thư contain no further records about Zhou Chang in the year 136 as by the following year 137, Fan Yan was recorded as Jiaozhi governor. In the same year, Cham people led by Sri Mara (Vietnamese: Khu Liên) rebelled in Xianglin, and Fan Yan led an army of over ten thousands troops from both Jiaozhi and Jiuzhen to quell the uprising. However, the army had low morale due to the long marching distance and Fan Yan was defeated by the rebels. Giả Xương, an official was appointed to Rinan to lead the army of other districts and provinces in the region to quell the uprising but failed and was besieged by the rebels for more than one year. In 138, Zhang Qiao, who had just been appointed as Jiaozhou's governor along with the sitting Jiuzhen's governor Zhu Liang successfully made peace with the rebels in Xianglin. History records don't clarify the terms of the peace agreements between the Han dynasty governors and the rebels, so it remains unclear what happened to Sri Mara after that event. While Đại Việt sử ký toàn thư mentions "Sri Mara" as the leader of the uprising, An Nam chí lược states that the rebellion was led by 'barbarians' and does not mention the leader name. Keith W. Taylor's The Birth of the Vietnam (1983) places Sri Mara's uprising in 192, while no Vietnamese or Chinese historical sources record any uprising occurring in Xianglin or Jiaozhi in that year 192. As historical sources date the year Sri Mara declared himself King of Lâm Ấp and founded the kingdom to 192, this has led to the hypothesis that 'Sri Mara' may have been a noble title used by multiple leaders, due to the gap between 138 and 192.

In 144, Cham people again launched another two rebellions which provoked mutinies in the imperial army from Jiaozhi and Jiuzhen, then rebellion in Jiaozhi. Xia Fang, the governor of Jiaozhi, according to Kiernan, "lured them to surrender" with "enticing words." Xia Fang was subsequently appointed governor of Guiyang, while Lưu Tảo succeeded him as governor of Jiaozhi.

In 157, local leader Chu Đạt in Jiuzhen rebelled and killed the Chinese magistrate of Jufeng who was notorious for his greed and cruelty, then marched north with an army of four to five thousand. War broke out between Ni Shi (Vietnamese: Nghê Thức), the governor of Jiuzhen, and the rebels, during which Ni Shi was killed in action. The Han general of Jiuzhen, Wei Lang, gathered an army and defeated Chu Đạt, beheading 2,000 rebels.

In 159 and 161, Indian merchants arrived Jiaozhi and paid tribute to the Han government. Introduced by Indian merchants via sea, by late Han period, Buddhism quickly became the most predominant religion in Northern Vietnam, whereas the Dâu Temple (circa. 2nd century AD) was the first Buddhist temple in Vietnam.

In 160, rebellion broke out one more time in Jiuzhen. Xia Fang, who was now governor of Guiyang, was re-appointed as governor of Jiaozhi. Owing to his influence and benevolent governance during his previous tenure in Jiaozhi in the 140s, Xia Fang easily called the rebels for surrender.

In 166, a Roman trade mission arrived Jiaozhi, bringing "tribute" (from the Chinese perspective) to the Han, which "were likely bought from local markets" of Rinan and Jiaozhi.

In 178, Wuhu people (烏滸) under Liang Long sparked a revolt against the Han in Hepu and Jiaozhi, which Jiaozhi's inspector Chou Yung failed to suppress. Liang Long spread his revolt to all northern Vietnam, Guangxi and central Vietnam as well, attracting all non-Chinese ethnic groups in Jiaozhi to join. In 181, the Han empire sent general Zhu Juan to deal with the revolt, while Nanhai inspector Kong Zhi also led thousands of residents to join Liang Long's revolt. In June 181, Liang Long was captured and beheaded, and his rebellion was suppressed, while the fate of Kong Zhi remains unrecorded. In recognition of his achievements for suppressing the revolt, the Han imperial court enfeoffed Zhu Juan as a Marquis of a Chief Village and summoned him to the imperial capital Luoyang to serve as a Counsellor Remonstrant. Chou Yung remained as Jiaozhi's inspector.

In 183, the local army launched a coup, captured Chou Yung, and subsequently executed him. The military junta then sent an envoy to the Han dynasty to accuse Chou Yung of his crimes. The accusation listed various corrupt governors of Jiaozhi who exploited the region’s resources — such as pearls, rhinoceros horns, ivory, tortoiseshell, rare spices, and valuable timber — to enrich themselves and then apply for reassignment to another post. The military junta also blamed the high taxes and the suppression of their right to file complaints, which they claimed led to the revolt — though they insisted that none of them had originally wanted an uprising. Emperor Ling agreed with the accusation and assigned Jia Cong as Jiaozhi governor. Jia Cong then sent his people throughout the region to offer guidance and encouragement, persuading the rebels to return to their livelihoods. He also reduced taxes and executed corrupt officials, replacing them with benevolent ones. Peace was restored in Jiaozhi, and the residents praised Jia Cong for his just and effective governance. After governing Jiaozhi for 3 years, Jia Cong was recalled to the capital amid the political crisis under Emperor Ling, and was succeeded by Lý Tiến, a native of Jiaozhi. Đại Việt sử ký toàn thư marked this event as the end of Eastern Han domination in Jiaozhi, which had lasted for 144 years (43-186).

Three Kingdoms era In 187, Shi Xie (Vietnamese: Sĩ Nhiếp) was appointed governor of Jiaozhi amid the province's crisis during the final years of the Eastern Han dynasty. When China plunged into civil war, Shi Xie ruled Jiaozhi as an independent warlord from 187 until his death in 226. During that time, Shi Xie's younger brothers also held important positions in Jiao Province: Shi Yi (士壹), Shi Wei (士䵋) and Shi Wu (士武) were respectively the Administrators of Hepu (合浦), Jiuzhen (九真) and Nanhai (南海) commanderies in Jiao Province. As being a remote province in southern China, Shi Xie's Jiao was not caught up in the chaos of the Han Empire during its last days. Shi Xie soon proved himself to be a great and benevolent governor, who was deeply respected and even referred to as a 'king' by all the residents. His commanderies also attract hundreds of scholars from the Han dynasty amid the on-going political crisis in the empire.

During the Eastern Wu era, Shi Xie pledged allegiance to Sun Quan forces in 210 and later became a vassal of this empire. Shi Xie also sent his son Shi Xin (士廞) to the Wu to strengthen the allegiance. Shi Xie sent annual tribute to Sun Quan, including thousands of precious rare spices, silk, pearls, ivory and Jiaozhi's fruit to maintain good relations with Eastern Wu. In recognition of Shi Xie's effective governance, Sun Quan appointed him as General of the Guards (衛將軍) and awarded him the title "Marquis of Longbian" (龍編侯). When the Eastern Han dynasty split into the Three Kingdoms in 220, Jiaozhi was under the control of the state of Wu.