Southeast Asia circa 1010 AD. Đại Việt lands in yellow, Champa in green and Khmer Empire in purple.
When the king Lê Long Đĩnh died in 1009 AD, a Palace Guard Commander named Lý Công Uẩn was nominated by the court to take over the throne, and founded the Lý dynasty. This event is regarded as the beginning of a golden era in Vietnamese history, with great following dynasties. The way Lý Công Uẩn ascended to the throne was rather uncommon in Vietnamese history. As a high-ranking military commander residing in the capital, he had all opportunities to seize power during the tumultuous years after Emperor Lê Hoàn's death, yet preferring not to do so out of his sense of duty. He was in a way being "elected" by the court after some debate before a consensus was reached.
Lý Công Uẩn, posthumously referred as Lý Thái Tổ, changed the country's name to Đại Việt (literally "Great Viet"). The Lý Dynasty is credited for laying down a concrete foundation, with strategic vision, for the nation of Vietnam. Leaving Hoa Lư, a natural fortification surrounded by mountains and rivers, Lý Công Uẩn moved his court to the new capital in present-day Hanoi and called it Thăng Long (Ascending Dragon). Lý Công Uẩn thus departed from the militarily defensive mentality of his predecessors and envisioned a strong economy as the key to national survival. Successive Lý kings continued to accomplish far-reaching feats: building a dike system to protect the rice producing area; founding Quốc Tử Giám, the first noble university; holding regular examinations to select capable commoners for government positions once every three years; organizing a new system of taxation; establishing humane treatment of prisoners. Women were holding important roles in Lý society as the court ladies were in charge of tax collection. The Lý Dynasty also promoted Buddhism, yet maintained a pluralistic attitude toward the three main philosophical systems of the time: Buddhism, Confucianism, and Taoism. During the Lý Dynasty, the Chinese Song Dynasty officially recognized the Đại Việt monarch as King of Giao Chỉ (Giao Chỉ Quận Vương).
The Lý Dynasty had two major wars with Song China, and a few conquests against neighboring Champa in the south. The most notable battle took place on Chinese territory in 1075 AD. Upon learning that a Song invasion was imminent, the Lý army and navy totalling about 100,000 men under the command of Lý Thường Kiệt, Tông Đản used amphibious operations to preemptively destroy three Song military installations at Yong Zhou, Qin Zhou, and Lian Zhou in present-day Guangdong and Guangxi, and killed 100,000 Chinese. The Song Dynasty took revenge and invaded Đại Việt in 1076, but the Song troops were held back at the Battle of Như Nguyệt River commonly known as the Cầu river, now in Bắc Ninh province about 40 km from the current capital, Hanoi. Neither side was able to force a victory, so the Lý Dynasty proposed a truce, which the Song Dynasty accepted.
Trần royal battle standard.
Toward the end of the Lý Dynasty, a powerful court minister named Trần Thủ Độ forced king Lý Huệ Tông to become a Buddhist monk and Lý Chiêu Hoàng, Huệ Tông's young daughter, to become queen. Trần Thủ Độ then arranged the marriage of Chiêu Hoàng to his nephew Trần Cảnh and eventually had the throne transferred to Trần Cảnh, thus begun the Trần Dynasty. Trần Thủ Độ viciously purged members of the Lý nobility; some Lý princes escaped to Korea, including Lý Long Tường.
After the purge most Trần kings ruled the country in similar manner to the Lý kings. Noted Trần Dynasty accomplishments include the creation of a system of population records based at the village level, the compilation of a formal 30-volume history of Đại Việt (Đại Việt Sử Ký) by Lê Văn Hưu, and the rising in status of the Nôm script, a system of writing for Vietnamese language. The Trần Dynasty also adopted a unique way to train new kings: as a king aged, he would relinquish the throne to his crown prince, yet holding a title of August Higher Emperor (Thái Thượng Hoàng), acting as a mentor to the new Emperor.
Mongol invasions
During the Trần Dynasty, the armies of the Mongol Empire under Mongke Khan and Kublai Khan, the founder of the Yuan dynasty invaded Vietnam in 1257 AD, 1284 AD, and 1288 AD. Đại Việt repelled all attacks of the Yuan during the reign of Kublai Khan. The key to Đại Việt's successes was to avoid the Mongols' strength in open field battles and city sieges - the Trần court abandoned the capital and the cities. The Mongols were then countered decisively at their weak points, which were battles in swampy areas such as Chương Dương, Hàm Tử, Vạn Kiếp and on rivers such as Vân Đồn and Bạch Đằng. The Mongols also suffered from tropical diseases and loss of supplies to Trần army's raids. The Yuan-Trần war reached its climax when the retreating Yuan fleet was decimated at the Battle of Bạch Đằng (1288). The military architect behind Đại Việt's victories was Commander Trần Quốc Tuấn, more popularly known as Trần Hưng Đạo. In order to avoid disastrous campaigns, the Tran and Champa acknowledged Mongol supremacy.
Champa
It was also during this period that the Trần kings waged many wars against the southern kingdom of Champa, continuing the Viets' long history of southern expansion (known as Nam Tiến) that had begun shortly after gaining independence from China. Often, they encountered strong resistance from the Chams. Champa troops led by king Chế Bồng Nga (Cham: Po Binasuor or Che Bonguar) killed king Trần Duệ Tông in battle and even laid siege to Đại Việt's capital Thăng Long in 1377 AD and again in 1383 AD. However, the Trần Dynasty was successful in gaining two Champa provinces, located around present-day Huế, through the peaceful means of the political marriage of Princess Huyền Trân to a Cham king.
Ming occupation and the rise of the Lê Dynasty
The Trần dynasty was in turn overthrown by one of its own court officials, Hồ Quý Ly. Hồ Quý Ly forced the last Trần king to resign and assumed the throne in 1400. He changed the country name to Đại Ngu (Hán tự: 太虞) and moved the capital to Tây Đô, Western Capital, now Thanh Hóa. Thăng Long was renamed Đông Đô, Eastern Capital. Although widely blamed for causing national disunity and losing the country later to the Chinese Ming Dynasty, Hồ Quý Ly's reign actually introduced a lot of progressive, ambitious reforms, including the addition of mathematics to the national examinations, the open critique of Confucian philosophy, the use of paper currency in place of coins, investment in building large warships and cannon, and land reform. He ceded the throne to his son, Hồ Hán Thương, in 1401 and assumed the title Thái Thượng Hoàng, in similar manner to the Trần kings.
In 1407, under the pretext of helping to restore the Trần Dynasty, Chinese Ming troops invaded Đại Ngu and captured Hồ Quý Ly and Hồ Hán Thương. The Hồ Dynasty came to an end after only 7 years in power. The Ming occupying force annexed Đại Ngu into the Ming Empire after claiming that there was no heir to Trần throne. Almost immediately, Trần loyalists started a resistance war. The resistance, under the leadership of Trần Quĩ at first gained some advances, yet as Trần Quĩ executed two top commanders out of suspicion, a rift widened within his ranks and resulted in his defeat in 1413.
In 1418, a wealthy farmer, Lê Lợi, led the Lam son revolution against the Ming from his base of Lam Sơn (Thanh Hóa province). Overcoming many early setbacks and with strategic advices from Nguyễn Trãi, Lê Lợi's movement finally gathered momentum, marched northward, and launched a siege at Đông Quan (now Hanoi), the capital of the Ming occupation. The Ming Emperor sent a reinforcement force, but Lê Lợi staged an ambush and killed the Ming commander, Liễu Thăng (Chinese: Liu Sheng), in Chi Lăng. Ming troops at Đông Quan surrendered. The Lam son revolution killed 300,000 Ming soldiers. In 1428, Lê Lợi ascended to the throne and began the Hậu Lê dynasty (Posterior or Later Lê). Lê Lợi renamed the country back to Đại Việt and moved the capital back to Thăng Long.
Map of Vietnam showing the conquest of the south (the Nam tiến, 1069-1757). Orange: Before the 11th century. Yellow: 11th century. Light Green: 15th century. Dark Green: 16th century. Purple: 18th century. Lai Chau and Dien Bien (the Northwest): 19th century.
The Lê Dynasty carried out land reforms to revitalize the economy after the war. Unlike the Lý and Trần kings, who were more influenced by Buddhism, the Lê kings leaned toward Confucianism. A comprehensive set of laws, the Hồng Đức code was introduced with some strong Confucian elements, yet also included some progressive rules, such as the rights of women. Art and architecture during the Lê Dynasty also became more influenced by Chinese styles than during the Lý and Trần Dynasty. The Lê Dynasty commissioned the drawing of national maps and had Ngô Sĩ Liên continue the task of writing Đại Việt's history up to the time of Lê Lợi. King Lê Thánh Tông opened hospitals and had officials distribute medicines to areas affected with epidemics.
In 1471, Le troops led by king Lê Thánh Tông invaded Champa and captured its capital Vijaya. This event effectively ended Champa as a powerful kingdom, although some smaller surviving Cham kingdoms still lasted for a few centuries more. It initiated the dispersal of the Cham people across Southeast Asia. With the kingdom of Champa mostly destroyed and the Cham people exiled or suppressed, Vietnamese colonization of what is now central Vietnam proceeded without substantial resistance. However, despite becoming greatly outnumbered by Kinh (Việt) settlers and the integration of formerly Cham territory into the Vietnamese nation, the majority of Cham people nevertheless remained in Vietnam and they are now considered one of the key minorities in modern Vietnam. The city of Huế, founded in 1600 lies close to where the Champa capital of Indrapura once stood. In 1479, King Lê Thánh Tông also campaigned against Laos and captured its capital Luang Prabang. He made further incursions westwards into the Irrawaddy River region in modern-day Burma before withdrawing.