What do we know about the history of ancient Vietnam?

            According to legend, the Vietnamese people descended from the dragon king Lac long Quan and the immortal fairy, Au Co. They had a hundred children. The eldest became the first of the Hung kings. The people of the time were known as Lac Viet. In the 3rd century BC, a group of people migrated to Vietnam from South China. They were known as the Au Viet. They mixed with the Lac Viet. The kingdom of Au Lac was established in 210 BC. China took control of Vietnam from the 2nd century AD. Vietnam became free from China only in 960 AD. King Ly Cong Uan founded the kingdom of Dai Viet in 1009 under the Ly dynasty. His successor, Ly Phat Ma issued the law code known as Minh-Dao or the clear way.

            The Ly dynasty was followed by the Tran dynasty which ruled between 1225 and1400. Together with the Cham, they fought off the invasion of Kublai Khan from China. However, the north of Vietnam came under Chinese rule from 1407. Champa was the kingdom of the Chams. The Chams were Central and South Vietnamese rice farmers. Champa made itself independent in the 4th century. King Indravarman II made Indrapura the new capital, in the 9th century. Champa was occupied by the Khmers in the 10th century and the Dai Viet in the 11th century. In 1167, Champa gained independence with Chinese help.