An independent Vietnamese state was formed in 939, following a Vietnamese victory in the Battle of Bạch Đằng River.
In 207 BC, a Chinese general named Zhao Tuo defeated An Dương Vương and consolidated Âu Lạc into Nanyue.
However, Nanyue was itself incorporated into the empire of the Chinese Han dynasty in 111 BC after the Han–Nanyue War.
Following the 1406–7 Ming–Hồ War which overthrew the Hồ dynasty, Vietnamese independence was briefly interrupted by the Chinese Ming dynasty, but was restored by Lê Lợi, the founder of the Lê dynasty.
The Vietnamese dynasties reached their zenith in the Lê dynasty of the 15th century, especially during the reign of Emperor Lê Thánh Tông (1460–1497).
Its capital city has been Hanoi since the reunification of North and South Vietnam in 1976, with Ho Chi Minh City as the most populous city.
The northern part of Vietnam was part of Imperial China for over a millennium, from 111 BC to AD 939.
Conflict between the two sides intensified in what is known as the Vietnam War, with heavy intervention by the United States on the side of South Vietnam from 1965 to 1973.
The war ended with a North Vietnamese victory in 1975.
By about 1000 BC, the development of wet-rice cultivation and bronze casting in the Ma River and Red River floodplains led to the flourishing of the Đông Sơn culture, notable for its elaborate bronze Đông Sơn drums.
At this time, the early Vietnamese kingdoms of Văn Lang and Âu Lạc appeared, and the culture's influence spread to other parts of Southeast Asia, including Maritime Southeast Asia, throughout the first millennium BC.
Its successful economic reforms resulted in its joining the World Trade Organization in 2007.