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 the 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.
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.
In Guangzhou province of south China, however, the former Tang governor, Liu Yan declared himself the emperor of the emergent Southern Han kingdom.
The 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ỹ, defeating the Southern Han army and in the process appointing himself 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, Governor of the Ái district, initiated hostilities against Kiều Công Tiễn.
The Vietnamese forces purposefully held the enemy in check for hours, waiting for the tides receded and the spikes to impale the Chinese armada.
With the Southern Han navy in disarray, the Vietnamese forces followed the impalement with ferocious fire attacks and annihilated hundreds of giant warships.
[5] Ngô Xương Văn (吳昌文) deposed Dương Tam Kha in 950 and styled himself "Nam Tấn Vương" (南晉王).
Ascended to the throne, Ngô Xương Xí was faced with the daunting task of having his rule recognized in a period of open rivalry between the 12 lords who fought one another for control of the country.
With the announcement of his rule, the country further disrupted and thrown into a chaotic period called the Anarchy of the 12 Warlords (Vietnamese: Loạn 12 sứ quân).