Đinh Bộ Lĩnh was born in 924 in Hoa Lư (south of the Red River Delta, in what is today Ninh Bình Province). Growing up in a local village during the disintegration of the Chinese Tang Dynasty that had dominated Vietnam for centuries, Đinh Bộ Lĩnh became a local military leader at a very young age. From this turbulent era, the first independent Vietnamese polity emerged when the warlord Ngô Quyền defeated the Southern Han's forces in the First Battle of the Bạch Đằng River in 938. However, the Ngô Dynasty was weak and unable to effectively unify Vietnam. Faced with the domestic anarchy produced by the competition of twelve feudal warlords for control of the country, as well as the external threat represented by Southern Han, which regarded itself as the heir to the ancient kingdom of Nan Yue that had encompassed not only southern China but also the Bac Bo region of northern Vietnam, Đinh Bộ Lĩnh sought a strategy to politically unify the Vietnamese. Upon the death of the last Ngô king in 965, he seized power and founded a new kingdom the capital of which was in his home district of Hoa Lư. To establish his legitimacy in relation to the previous dynasty, he married a woman of the Ngô family.