Gia Long (Chữ Hán: 嘉隆) (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 founding emperor of the Nguyễn dynasty, the last dynasty of Vietnam, which would rule the unified territories that constitute modern-day Vietnam until 1945.
A nephew of the last Nguyễn lord who ruled over south Vietnam, Nguyễn Phúc Ánh was forced into hiding in 1777 as a 15-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 Nguyễn Phúc Ánh's cause to regain the throne to the French government and managed to recruit volunteers however, that soon encountered difficulties. From 1789, Nguyễn Phúc Ánh was once again in the ascendancy and began his northward march to defeat the Tây Sơn, reaching the border with the Qing dynasty 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 the Qing's borders down to the Gulf of Siam.
Gia Long's rule was noted for its Confucian orthodoxy. He defeated 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 several 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.
Born in Phú Xuân (modern-day Huế, central Vietnam) on 8 February 1762, he also had two other names in his childhood: Nguyễn Phúc Chủng (阮福種) and Nguyễn Phúc Noãn (阮福暖). Nguyễn Phúc Ánh was the third son of Nguyễn Phúc Luân and Nguyễn Thị Hoàn. Luan was the second son of Lord Nguyễn Phúc Khoát of southern Vietnam; the first son had already predeceased the incumbent Lord. There are differing accounts on which son was the designated successor. According to one theory, Luân was the designated heir, but a high-ranking mandarin named Trương Phúc Loan changed Khoat's will of succession on his deathbed, and installed Luan's younger brother Nguyễn Phúc Thuần, the sixteenth son, on the throne in 1765. Luan was jailed and died in 1765, the same year as Thuan's installation. However, the historian Choi Byung Wook claims that the notion that Luân was the designated heir was based on fact but was propagated by 19th century Nguyễn dynasty historians after Nguyễn Phúc Ánh had taken the throne as Gia Long to establish the emperor's legitimacy. According to Choi, Lord Khoát had originally chosen the ninth son, who then died, leaving Loan to install Lord Thuần. At the time, the alternative was the eldest son of the ninth son, Nguyễn Phúc Dương, whom opposition groups later tried unsuccessfully to convince to join them as a figurehead to lend legitimacy. In 1775, Thuan was forced to share power with Dương by military leaders who supported the Nguyêns. At this time, Nguyễn Phúc Ánh was a minor member of the family and did not have any political support among court powerbrokers.
However, Thuan lost his position as lord of southern Vietnam and was killed, along with Duong, during the Tây Sơn rebellion led by the brothers Nguyễn Nhạc, Nguyễn Huệ and Nguyễn Lữ in 1777. Nguyễn Phúc Ánh was the most senior member of the ruling family to have survived the Tây Sơn victory, which pushed the Nguyễn from their heartland in central Vietnam, southwards towards Saigon and into the Mekong Delta region in the far south. This turn of events changed the nature of the Nguyễn power hierarchy; the family and the first leader Nguyễn Hoàng had originally come from Thanh Hoa Province in northern Vietnam, and this is where most of their senior military and civil leadership's heritage derived from, but as a result of the Tây Sơn's initial successes, much of this old power base was destroyed and Nguyễn Phúc Ánh had to rebuild his support network among southerners, who later became the core of the regime when the Nguyễn dynasty was established.
Nguyễn Phúc Ánh was sheltered by a Catholic priest Paul Nghi (Phaolô Hồ Văn Nghị) in Rạch Giá. Later, he fled to Hà Tiên on the southern coastal tip of Vietnam, where he met Pigneau de Behaine, a French priest who became his advisor and played a major part in his rise to power. Receiving information from Paul Nghi, Pigneau avoided the Tay Son army in Cambodia, and came back to assist Nguyễn Phúc Ánh. They hid in the forest to avoid the pursuit of Tay Son army. Together, they escaped to the island of Pulo Panjang in the Gulf of Siam. Pigneau hoped that by playing a substantial role in a Nguyễn Phúc Ánh victory, he would be in position to lever important concessions for the Catholic Church in Vietnam, helping its expansion in Southeast Asia.
In late 1777, the main part of the Tây Sơn army left Saigon to go north and attack the Trịnh lords, who ruled the other half of Vietnam. Nguyễn Phúc Ánh stealthily returned to the mainland, rejoining his supporters and reclaimed the city of Saigon. He was crucially aided by the efforts of Do Thanh Nhon, a senior Nguyễn Lord commander who had organized an army for him, which was supplemented by Cambodian mercenaries and Chinese pirates. The following year, Nhon expelled additional Tây Sơn troops from the surrounding province of Gia Định and inflicted heavy losses on the Tây Sơn naval fleet. Taking advantage of the more favorable situation, Nguyễn Phúc Ánh sent a diplomatic mission to Siam to propose a treaty of friendship. This potential pact, however, was derailed in 1779 when the Cambodians rose up against their pro-Siamese leader Ang Non II. Nguyễn Phúc Ánh sent Nhon to assist the revolt, which eventually saw Ang Non II defeated decisively and executed.
Nhon returned to Saigon with high honor and concentrated his efforts on improving the Nguyễn navy. In 1780, in an attempt to strengthen his political status, Nguyễn Phúc Ánh proclaimed himself Nguyễn vương (Nguyễn king or Nguyễn ruler in Vietnamese) with the support of Nhon's Dông Sơn Army. In 1781, Nguyễn Phúc Ánh sent further forces to prop up the Cambodian regime against Siamese armies who wanted to reassert their control. Shortly thereafter, Nguyễn Phúc Ánh had Nhon brutally murdered. The reason remains unclear, but it was postulated that he did so because Nhon's fame and military success was overshadowing him. At the time, Nhon had much, if not dominant power, behind the scenes. According to later Nguyễn dynasty chronicles, Nhon's powers included that of deciding who would receive the death penalty, and allocating budget expenditures. Nhon also refused to allocate money for royal spending. Nhon and his men were also reported to have acted in an abrasive and disrespectful manner to Nguyễn Phúc Ánh.
The Tây Sơn brothers reportedly broke out in celebration upon hearing of Nhon's execution, as Nhon was the Nguyễn officer whom they feared the most. Large parts of Nhon's supporters rebelled, weakening the Nguyễn army, and within a few months, the Tây Sơn had recaptured Saigon mainly on the back of naval barrages. Nguyễn Phúc Ánh was forced to flee to Ha Tien, and then onto the island of Phu Quoc. Meanwhile, some of his forces continued to resist in his absence. While the murder of Nhon weakened Nguyễn Phúc Ánh in the short term, as many southerners who were personally loyal to Nhon broke away and counter-attacked, it also allowed Nguyễn Phúc Ánh to gain autonomy and then take steps towards exerting direct control over the remaining local forces of the Dong Son who were willing to work with him. Nguyễn Phúc Ánh also benefited from the support of Chau Van Tiep, who had a power base in the central highlands between the strongholds of the Nguyễn and the Tây Sơn.