The Five Dynasties and Ten Kingdoms period in China provided a unique window for Vietnam to reclaim its sovereignty. After centuries of 'Northern Domination,' local leaders like the Khuc family and later Duong Dinh Nghe began to govern the region independently. However, the Southern Han Dynasty, one of the ten kingdoms based in Guangzhou, sought to re-assert Chinese control over the 'Annam' region. In 930, Southern Han forces launched a major invasion, capturing the regional capital and taking the Vietnamese leader prisoner.
The resistance was soon taken up by Duong Dinh Nghe, who managed to expel the Southern Han in 931. But internal treachery struck when Kieu Cong Tien assassinated Duong and, fearing a counterattack from Ngo Quyen, invited the Southern Han to intervene again. This provided the pretext for the Southern Han Emperor Liu Yan to send a massive naval expedition led by his son, Liu Hongcao. This invasion force was intended to finally crush Vietnamese aspirations for independence.
Ngo Quyen, anticipating the naval attack, devised a brilliant defensive plan at the Bach Dang River. He had thousands of heavy, iron-tipped wooden stakes driven into the riverbed, invisible during high tide. As the Southern Han fleet entered the river, Ngo Quyen's small, nimble boats lured them further upstream. When the tide turned, the retreating Southern Han ships were impaled on the stakes and decimated. Liu Hongcao was killed in the battle, and the Southern Han fleet was destroyed. This victory was so decisive that the Southern Han never attempted to invade again. In 939, Ngo Quyen declared himself King, ending 1,000 years of Chinese rule and beginning the era of independent Vietnamese dynasties.