Ngô dynasty
The Ngô dynasty (; Chữ Hán: 吳朝) was a dynasty that ruled Tĩnh Hải quân (Jinghai) in northern Vietnam from 939 to 965. The dynasty was founded by Ngô Quyền, who led Vietnamese forces in the Battle of Bạch Đằng River against the Chinese Southern Han dynasty in 938. Around 930, as Ngô Quyền rose to power, northern Vietnam was militarily occupied by the Southern Han and was treated as an autonomous province and vassal state of Later Tang Dynasty, referred to as Tĩnh Hải quân. Every year the Jiedushi of Tĩnh Hải quân had to pay tribute to  its Chinese master in exchange for peace and political support. At the beginning of the 10th century, China was domestically plagued and weakened by civil war during what is known as the Five Dynasties and Ten Kingdoms period. The Chinese were preoccupied with these civil struggles and lost their grip on Tĩnh Hải quân periodically. Tĩnh Hải quân took advantage of this opportunity and proclaimed its independence and seceded from China. Under the rule of Lord Protector Dương Đình Nghệ, the Tĩnh Hải quân state initiated a full blown military campaign for independence. Background. Pre-independence. After defeating the Sui  dynasty of China, the Tang dynasty adjusted its administrative divisions and provinces, maintaining Chinese rule in Vietnam. In the late 9th Century, however, civil unrest increased and the rebellion of Huang Chao weaken the Tang dynasty. At the beginning of the 10th Century in 905, a member of the Khúc clan of Vietnam, Khúc Thừa Dụ took advantage of the continuing turmoil in China, seized power from the weakened Tang, and appointed himself Jiedushi (Viet: Tiết độ sứ) establishing a degree of autonomy for Vietnam. In 906 the Tang recognized Jiaozhi as an autonomous state, however a year later the  Tang dynasty ended when Zhu Wen overthrew Tang rule establishing the Later Liang Dynasty for himself and ushering in the division of China into the short-lived empires of the Five Dynasties and Ten Kingdoms period. During this time of civil wars in China, the Khúc clan attempted to increase its power and control over Vietnam. In Guangzhou province of south China, however, the former Tang governor, Liu Yan declared himself the emperor of the emergent Southern Han kingdom. In 917, Khúc Thừa Mỹ succeeded Khúc Hạo as Jiedushi of Tĩnh Hải Quân and reached out to the Liang Dynasty  in northern China seeking political support as a vassal state. Such an action angered the Southern Han and in 930 emperor Liu Yan attempted to bring Tĩnh Hải Quân under his control by invading the capital city and taking Khúc Thừa Mỹ captive. Shortly thereafter, however, Dương Đình Nghệ, the Governor of the Ái Châu district of Tĩnh Hải Quân sent troops to rescue Khúc Thừa Mỹ, defeated the Southern Han army, and in the process appointed himself as Jiedushi of Jinghai. In 937, Dương Đình Nghệ was assassinated by his official Kiều Công Tiễn who declared himself loyal to  the Southern Han's emperor. Immediately thereafter, Dương Đình Nghệ's son in law, general Ngô Quyền who was governing the Ái district, initiated hostilities against Kiều Công Tiễn. Battle of Bạch Đằng River. Ngô Quyền (897–944) was Dương Đình Nghệ's most loyal general and son-in-law. He served under Dương Đình Nghệ's command and married one of his daughters. After the murder of father-in-law, Ngô Quyền sought revenge. He launched an attack and defeated Kiều Công Tiễn in 938. The latter, before his death in battle with Ngô Quyền, sent an emissary to Southern  Han court to ask for military re-enforcement. The Southern Han state's emperor then sent an army to the South land to assist Kiều Công Tiễn in 938. However, Ngô Quyền's forces were tipped off over the advancing Southern Han army and therefore he quickly mobilized his forces and strategically stationed them in key battle sites. To defeat the Southern Han army coming to supply aid to his rival, Ngô Quyền and his troops planted iron spikes underneath the Bạch Đằng River and timed the attack of the Southern Han navy. The attack began during high tide to  conceal the spikes beneath the water. After the Vietnamese held the enemy in check for hours, the tides receded and the spikes impaled the Chinese armada. The Vietnamese forces followed this impalement with ferocious fire attacks, which annihilated hundreds of giant warships. The Southern Han navy and the Prince of Southern Han were killed in the battle, thus ended SH's ambition over Annam. Independence era(938). Ngô Quyền's reign. The Battle of Bạch Đằng River was the first significant of many victories throughout the centuries at this famous river. Ngô Quyền then ascended to the throne and took the  name "Ngô Vương" (King Ngô) or "Tiền Ngô Vương". He moved the capital back to Cổ Loa. He reigned for only five years, until 944, when he died of illness at age 47. A short reign for an ambitious ruler set the stage for future campaigns for independence. Nevertheless, Ngô Vương ushered in a new Viet era of continuous independence and political autonomy. Due to the Ngô dynasty's failure to control chieftains and Ngô Quyền's failure to gain Chinese acknowledgement of his legitimacy as a ruler, it was little more than a protectorate of the Song dynasty. Royal  Court disputes. Before his death, Ngô Vương's wish was to see his brother-in-law Dương Tam Kha act as regent for his son Ngô Xương Ngập. However Dương Tam Kha usurped the throne and proclaimed himself "Bình Vương" (平王). He took Ngô Xương Ngập's younger brother, Ngô Xương Văn, as his adoptive son and made him heir to the throne. Fearing for his life, Ngô Xương Ngập went into hiding with his retinue in Nam Sách(now Hải Dương province). Dương Tam Kha's reign was unpopular and many revolts and rebellions sprung up across the kingdom. Ngô  Xương Văn & Ngô Xương Ngập co-reign: 950–954. Ngô Xương Văn (吳昌文) deposed Dương Tam Kha in 950 and styled himself "Nam Tấn Vương" (南晉王) Out of respect for his uncle, Ngô Xương Văn did not have him killed, but merely demoted him and sent him into exile. Ngô Xương Văn then searched out his older brother Ngô Xương Ngập in order to share the throne with him. After arriving at the capital, Ngô Xương Ngập styled himself "Thiên Sách Vương" (天策王). Brought back by his younger brother Ngô Xương Văn to the throne, Ngô Xương Ngập soon abused his  rights as the oldest son and began to rule Tĩnh Hải quân as dictator, "Thiên Sách Vương" (天策王). The country was ripe for open rivalries between different lords who fought each other to become the next successor. Ngô Xương Xí's reign: 965–968. After Ngô Xương Văn's death in 965, his son Ngô Xương Xí (吳昌熾) succeeded him. But as he ascended to the throne Ngô Xương Xí was faced with the daunting task of having his rule recognized by the now open rivalry between the 12 lords who fought one another as they vied for control of the  country. With the announcement of his rule, the country was thrown into a chaotic period called the Thập Nhị Sứ Quân (十二使君) Rebellion. Breakup and Civil war. Section::::"The Anarchy of the 12 Warlords" or "Thập Nhị Sứ Quân Rebellion" (966–968). The depression of Ngô dynasty caused the uprising of some governors who want to revolt to the royal court. In 951, Duke Đinh Bộ Lĩnh of Hoa Lư district who was the son of Governor of Hoan district Đinh Công Trứ, relied on the difficult geography of mountain area and start his rebellion against the Ngô dynasty. Both king of  Tĩnh Hải Quân Ngô Xương Văn & Ngô Xương Ngập launched the military campaign against Đinh Bộ Lĩnh. However, after more than a month, Royal troops failed to succeed and returned to the capital and keep persuading Duke Đinh to give up. In 954 Ngô Xương Ngập died and the leader of Thao Gian district Chu Thái also started to betray Ngô dynasty. Then, Ngô Xương Văn had to use force to suppress the revolt and beheaded Chu Thái. In 965 he was shot by arrows of archeries and died. His son, Ngô Xương Xí took up his leadership but the  dynasty gradually fall in the weakness. According to Khâm định Việt sử Thông giám cương mục(Historical record), The Kiều clan and Dương clan revolted against the Ngô and in 966. The country was divided into 12 states and ruled by 12 warlords in which there were also the Ngô royalty (Ngô Xương Văn, Ngô Nhật Khánh). After having submission of the royal clan in the 960s, to strengthen his position, Đinh Bộ Lĩnh married one of his daughters to the last Ngô king; he married a younger sister of that king to his eldest son Ngô Nhật Khánh, and he  took the Ngô queen mother as one of his wives. In 968 Đinh Bộ Lĩnh established a new kingdom of Dai Viet. Ngô Nhật Khánh quickly became a dissent and went exile in Champa. When Đinh Bộ Lĩnh died in 979, Nhật Khánh persuaded the Cham king Paramesvaravarman I boarded a fleet to reclaim the throne, however the expedition was scuttled by a typhoon and Nhật Khánh was drown.