Emperor Gia Long conquers Hanoi and unified Viet Nam, which had experienced centuries of feudal warfare.

Gia Long (Vietnamese: [zaː lawŋ] (North), [jaː lawŋ] (South); 8 February 1762 – 3 February 1820), born Nguyễn Phúc Ánh (阮福暎) or Nguyễn Ánh, was the first Emperor of the unified Vietnamese monarchy. Unifying what is now modern Vietnam in 1802, he founded the Nguyễn dynasty, the last of the Vietnamese dynasties.

A nephew of the last Nguyễn lord who ruled over south Vietnam, Nguyễn Ánh was forced into hiding in 1777 as a fifteen-year-old when his family was slain in the Tây Sơn revolt. After several changes of fortune in which his loyalists regained and again lost Saigon, he befriended the French Catholic bishop Pierre Pigneau de Behaine. Pigneau championed his cause to the French government and managed to recruit volunteers when that fell through to help Nguyễn Ánh regain the throne. From 1789, Nguyễn Ánh was once again in the ascendancy and began his northward march to defeat the Tây Sơn, reaching the border with China by 1802, which had previously been under the control of the Trịnh lords. Following their defeat, he succeeded in reuniting Vietnam after centuries of internecine feudal warfare, with a greater landmass than ever before, stretching from China down to the Gulf of Siam.

Gia Long's rule was noted for its Confucian orthodoxy. He overcame the Tây Sơn rebellion and reinstated the classical Confucian education and civil service system. He moved the capital from Hanoi south to Huế as the country's populace had also shifted south over the preceding centuries, and built up fortresses and a palace in his new capital. Using French expertise, he modernized Vietnam's defensive capabilities. In deference to the assistance of his French friends, he tolerated the activities of Roman Catholic missionaries, something that became increasingly restricted under his successors. Under his rule, Vietnam strengthened its military dominance in Indochina, expelling Siamese forces from Cambodia and turning it into a vassal state.