After the Tang fell, the local houses of Annam (Jiaozhi) held the Peaceful Sea Command hereditarily, and the Southern Han Liu house twice seized it by arms: in 930 it took Qu Chengmei captive, and in 937 Yang Dianyi was killed by his own officer Kiều Công Tiễn, who then submitted to Southern Han. In 938 Ngô Quyền — Yang Dianyi's son-in-law, or by other accounts his former general — rose from Ái Châu against Kiều Công Tiễn, who called on Southern Han for aid; the Han ruler Liu Yan sent his son Liu Hongcao with a fleet by the sea route. Ngô Quyền first held the approaches, had his soldiers fell trees into stakes with iron-shod points, and planted them under the Bạch Đằng river's tideline, then lured the enemy upriver with small boats. When the Han fleet rode the flood tide in, Ngô Quyền struck; on the ebb every hull fouled the stakes and capsized, and his banks of men closed in from both shores — a crushing victory, Liu Hongcao slain in the field and the Han remnant fleeing home. In 939 Ngô Quyền proclaimed himself king, set his seat at Cổ Loa, established the officials and the dress codes; Vietnamese historiography takes this as the beginning of self-rule after Chinese county government. Đinh Bộ Lĩnh later pacified the Twelve Warlords and founded Đại Cồ Việt in 968, fixing the autonomous order. Three battles on the Bạch Đằng are inscribed in the national memory — Ngô Quyền over Southern Han in 938, Lê Hoàn over the Song in 981, and Trần Hưng Đạo over the Yuan in 1288 — and Vietnam holds the river to this day as the symbol of its independence.