Anarchy of the 12 Warlords

The Anarchy of the 12 Warlords (Loạn 12 sứ quân, chữ Nôm: 亂𨑮𠄩使君; Sino-Vietnamese: Thập nhị sứ quân chi loạn, chữ Hán: 十二使君之亂), also the Period of the 12 Warlords, was a period of chaos and civil war in the history of Vietnam, from 965 to 968 caused by the succession of the Ngô dynasty after the death of King Ngô Quyền. This period is also sometimes simply called the Twelve Warlords (Mười hai sứ quân, 𨑮𠄩使君). Four of the warlords are verified to have traced their direct lineage from what is now China today. This period ended in 968 with the unification war of Vietnam by Đinh Bộ Lĩnh, who later established the Đinh dynasty.

History
In 939, Ngô Quyền became King of Tĩnh Hải quân (as Vietnam was called then) after defeating the Southern Han and declaring independence from centuries of Chinese rule. After Ngô Quyền's death in 944, his brother-in-law Dương Tam Kha, who was to serve as regent to the king's son Crown Prince Ngô Xương Ngập, usurped the throne and proclaimed himself king under the title Dương Bình Vương, ruling from 944 to 950. As a result, Crown Prince Ngô Xương Ngập fled and hid in the countryside. The prince's younger brother, Prince Ngô Xương Văn became the adopted son of Dương Tam Kha.

Division of Vietnam
Because of the illegitimate accession of Dương Tam Kha, many local warlords rebelled by seizing power of their local governments and creating conflicts with the Dương court. King Dương Tam Kha sent an army led by Prince Ngô Xương Văn to suppress the rebellion. However, with the army at his command, the prince staged a coup d'état in 950. Rather than administering a harsh punishment, Ngô Xương Văn forgave Dương Tam Kha and demoted him to the title of "Lord". Ngô Xương Văn was then crowned king under the title "Nam Tấn Vương", and sent envoys in search for his refuged older brother, Ngô Xương Ngập. In 951, Ngô Xương Ngập returned to Cổ Loa and was crowned king under the title "Thiên Sách Vương", and with his brother became a co-ruler of the Tĩnh Hải Quân. However, the co-rulership was short-lived, as the elder brother King Ngô Xương Ngập died of illness in 954.

Despite the return of the legitimate heirs to the throne, rebellions continued to afflict the country. In 965, in an attempt to quell a rebellion, King Ngô Xương Văn was killed in Bố Hải Khẩu (now Thái Bình Province) by his subordinate general, Lã Xử Bình. Lã Xử Bình then took control of the royal capital at Cổ Loa. Prince Ngô Xưong Xí, the son of King Ngô Xương Văn, inherited the throne, but he could not maintain his father's authority. He retreated to the area of Bình Kiều and established his power base there. When the Ngô dynasty collapsed under Lã Xử Bình's rebellion, Tĩnh Hải Quân became a power vacuum and divided into 12 domains where each was administered by a powerful warlord converging into three main factions during the conflict: the Ngô dynasty royalists under Ngô Xương Xí; military junta under Lã Xử Bình in Cổ Loa; and the regional governorship under Trần Lãm.

Other minor warlords eventually joined in and formed alliances among the three main factions of the conflict.

Đinh Bộ Lĩnh's Unification war
Đinh Bộ Lĩnh, adopted son of Lord Trần Lãm who ruled the region of Bố Hải Khẩu (now Thái Bình Province), succeeded Lãm after his death. In 968, Đinh Bộ Lĩnh defeated the other eleven major warlords and reunified the nation under his rule. In the same year, Đinh Bộ Lĩnh ascended the throne, proclaiming himself emperor with the title Đinh Tiên Hoàng, establishing the Đinh dynasty, and he renamed the nation as Đại Cồ Việt ("Great Viet"). He moved the capital to Hoa Lư (modern-day Ninh Bình).

List of 12 warlords
Of those, Ngô Xương Xí and Ngô Nhật Khánh were nobles of the Ngô dynasty, Phạm Bạch Hổ, Đỗ Cảnh Thạc, Kiều Công Hãn were officials of the Ngô dynasty. The remainders were considered local landlords or nobles from Northern nations, which was the ancient nations holding what is now China. Four of the lords are verified to have traced their lineage from what is now China today.
 * 1) Ngô Xương Xí held Bình Kiều, now Khoái Châu, (Triệu Sơn - Thanh Hóa) Thanh Hóa Province.
 * 2) Đỗ Cảnh Thạc referred himself as the Duke Đỗ Cảnh (Đỗ Cảnh Công), held Đỗ Động Giang, now Thanh Oai, Hà Nội (Chinese)
 * 3) Trần Lãm referred himself as the Duke Trần Minh, held Bố Hải Khấu, Kỳ Bố, Thái Bình Province
 * 4) Kiều Công Hãn referred himself as Kiều Tam Chế, held Phong Châu – Bạch Hạc, Phú Thọ Province (Chinese)
 * 5) Nguyễn Khoan referred himself as Nguyễn Thái Bình, held Tam Đái - Vĩnh Tường, Vĩnh Phúc Province
 * 6) Ngô Nhật Khánh referred himself as the Duke Ngô Lãm (Ngô Lãm Công), held Đường Lâm, Sơn Tây, Hà Nội
 * 7) Lý Khuê referred himself as Lý Lãng Công, held Siêu Loại - Thuận Thành, Bắc Ninh Province.
 * 8) Nguyễn Thủ Tiệp referred himself as Nguyễn Lệnh Công, held Tiên Du, Bắc Ninh Province (Chinese)
 * 9) Lã Đường referred himself as the Duke Lã Tá, held Tế Giang - Văn Giang, Hưng Yên Province
 * 10) Nguyễn Siêu referred himself as the Nguyễn Hữu Công, held Tây Phù Liệt - Thanh Trì, Hà Nội (Chinese)
 * 11) Kiều Thuận referred himself as the Kiều Lệnh Công, held Hồi Hồ - Cẩm Khê, Phú Thọ province
 * 12) Phạm Bạch Hổ referred himself as Phạm Phòng Át, held Đằng Châu, Hưng Yên Province.

Recent findings suggest that there was a 13th warlord that is not included in the list: Dương Huy, who ruled a region to the South-East of Cổ Loa.

Đinh Bộ Lĩnh
Đinh Bộ Lĩnh used to hold some posts in Hoan Châu (Nghệ An and Hà Tĩnh today), but lost his positions and went back to Hoa Lư in 950. Here, he became an adoptive son and subordinate general to Trần Lãm. Considering Đinh Bộ Lĩnh as a reasonable leader who could manage the circumstances, Trần Lãm retired and gave all power to him. Đinh Bộ Lĩnh led the army to occupy Hoa Lư, which became the national capital under his reign afterward.

Đinh Bộ Lĩnh was respected as Vạn Thắng Vương (萬勝王, Wànshèng Wáng, lt. the King of Ten Thousand Victories) because of the continuous victories. In 968, the era ended and was replaced by the era of the Đinh dynasty.

Defeating the warlords
Đinh Bộ Lĩnh began by defeating Lã Xử Bình in Cổ Loa.

The battle with Đỗ Cảnh Thạc in Đỗ Động Giang took over a year, until Đinh Bộ Lĩnh seized the fortress and Đỗ Cảnh Thạc was killed.

In Tây Phù Liệt, Nguyễn Siêu lost four of his generals in the first battle with Đinh Bộ Lĩnh. In the second battle, he split his army in half to seek backup. However, their ships were wrecked, upon which Đinh Bộ Lĩnh commanded his soldiers to set fire to the camps of the remaining army. Nguyễn Siêu died.

By the beginning of 968, after defeating and killing Nguyễn Thủ Tiệp, Kiểu Công Hãn, Nguyễn Khoan, Kiều Thuận, Lý Khuê, Lã Đường, the war ended and Đinh Bộ Lĩnh successfully united the divided regions.

He also convinced Phạm Bạch Hồ, Ngô Xương Xí, and Ngô Nhật Khánh to surrender and join his army.