Tĩnh Hải quân or ĩnhHảiquâJinghai Circuit (Chinese: 靜海軍, pinyin: Jìnghǎi Jūn) (literally "Peaceful Sea Army"), also known as Annam (安南), was an administrative division of the Tang dynasty of China administered by Chinese governors, which then later became a quasi-independent regime ruled by successive local Vietnamese warlords and monarchs. It was centered around what is now northern Vietnam from 866 to 967 during the late Tang period and lasted until the late Five Dynasties and Ten Kingdoms period when Đinh Bộ Lĩnh established the Đinh dynasty.
History
Chinese period
Jinghai Circuit (Tĩnh Hải quân) was created in 866 by the Chinese general Gao Pian as a Tang fanzhen ("buffer town") in the former Annan Duhufu (Protectorate General to Pacify the South) after retaking it from Nanzhao, which had invaded and captured the area in 863. The area of the command was sometimes referred to as "circuit" (道 dao). In 875, the Huang Chao rebellion broke out in northern China. In 879, the rebels sacked Guangzhou, headed north, bypassing Guangxi and northern Vietnam. A campaign against local aboriginals in Jinghai was conducted from 874 to 879. In 880, the army in Đại La mutinied, forcing the commander Zeng Gun to flee north, ending de facto Chinese control. Tang troops returned north in small groups of their own initiative. From 880 to 905, named holders of the post never actually governed Jinghai. In 904, Zhu Wen's brother Quanyu tried to enter the region but was immediately dismissed the next year for being "stupid and without ability."
Autonomous period
In 905, the native chief Khúc Thừa Dụ of the Khúc clan came to power and proclaimed himself jiedushi. In 907, his son Khúc Hạo (Chu Hao) succeeded as governor and was recognized by the Later Liang dynasty in northern China. In southern China, the powerful Liu Yin ruled over Guangzhou and was a close ally of Zhu Quanzhong. In 908 Khúc Hạo sent his son Khúc Thừa Mỹ to Guangzhou to gather information on the Liu family. When Liu Yin died in 911, Thừa Mỹ sent gifts to the Later Liang court by a naval envoy from the Min Kingdom. In the fifth month of the year, Liu Yin's brother and successor was named military governor at Guangzhou only. In the last month of the year, an imperial envoy arrived at Đại La to confirm Thừa Mỹ as military governor there. The Vietnamese Khúc family maintained a relationship with the Later Liang court through the Min state in Fujian. Wang Shenzhi called Thừa Mỹ's envoys "southern barbarian merchants".
In 917, Liu Yan proclaimed himself emperor of Southern Han. In 923, the Later Liang dynasty collapsed, so the Khúc family could no longer look north for legal and moral support. The Southern Han at Guangzhou controlled all of the Xi River basin; they were eager to add Tĩnh Hải quân to their realm and to reassemble the ancient inheritance of Zhao Tuo’s kingdom of Nanyue. In October 930, Liu Yan sent an army to occupy Đại La and met no resistance. Khúc Thừa Mỹ was captured and taken to Guangzhou, where he was allowed to live out his days quietly. In 931, a former vassal of the Khúc family, Dương Đình Nghệ from Aizhou (modern-day Thanh Hoá and Nghệ An), raised a 3,000-men army of retainers whom he called his adopted sons. Dương Đình Nghệ attacked the Southern Han army. The Southern Han general, Cheng Bao, failed to retake Tĩnh Hải from Dương Đình Nghệ and therefore he was decapitated.
Dương Đình Nghệ ruled Tĩnh Hải for 6 years. In 937, he was assassinated by Kiều Công Tiễn, a military subject who had given his allegiance to the Southern Han state and seized power. Ngô Quyền, a former general and son-in-law of Dương Đình Nghệ, marched north from Ai to avenge the death of his patron. The pro-Southern Han Kiều Công Tiễn called Liu Yan for help. Liu Yan placed his own son, Liu Hongcao, in command of the expedition, granting him the titles Jinghai jiedushi and King of Jiao, sailed to the coast of Annam and headed inland up the Bạch Đằng River, a northern arm of the Red River delta, to confront Ngô Quyền. Liu Yan himself set out from Guangdong, following his son's fleet with additional forces. In late 938, Ngô Quyền defeated the Southern Han fleet on the river by using barriers of sharpened stakes. When hearing the news that Liu Hongcao was killed, Liu Yan cried bitterly and withdrew his own fleet and returned to Guangzhou.