In 1802, Nguyen Anh, with the help of the French, proclaimed himself Emperor Gia Long (1802-1820) of the Nguyen Dynasty and established his capital at Hue. His first goals were to return to an absolute monarchy and to revive the bureaucratic system. As a reaction against the Tay Son Dynasty, all rights were taken away from women and villagers were taxed in the old ways once again. The Confucian system reached new heights of complexity and excess. There were now 18 levels of bureaucrats, each with a different style of clothing, per-requisites, salaries, and degrees of access to the imperial court. Resentment in the villages grew in intensity. Pockets of resistance were found throughout the Tonkin Delta, and the emperors who followed Gia Long found themselves expending most of their energy trying to control their own people. Meanwhile, the French began an invasion of some Vietnamese cities.
After Gia Long died, the throne was taken over by Minh Mang (1820-1841), who was stricter in his adherence to Chinese Confucianism. As a result of his training, Minh Mang was brilliant in matters of history and Chinese writing, while he had no idea what was happening outside of the imperial city. One of his main goals was to develop a troop of elephants to insure his military superiority. Thus, he ordered searches into Cambodia and Laos for elephants during the 1820s and 1830s while peasants in his capital were rioting over a lack of food and Europeans were making headway with far more sophisticated weaponry. Minh Mang had two major problems: increasingly fierce opposition of the rebels in the Tonkin Delta, and the growing influence of foreign missionaries and traders. His response was to turn down all requests for trade treaties with different countries and to issue decrees against the French religious and missionary activity.
The next emperor, Thieu Tri (1841-1847), followed the same pattern of leadership. Resistance in the north grew even stronger. At the same time, Thieu Tri continued to resist foreign trade and jail missionaries. Frustrated, the French eventually moved to direct aggression by taking over Danang. However, the Emperor did not change his position to trade or missionary activity and the French eventually left Danang and moved south to Saigon.
The major thrust of the French takeover of southern Vietnam occurred during the reign of Tu Duc (1848-1883), the last emperor of independent Vietnam. His reign saw, a continuation and escalation of the problems of his predecessors. Instead of trying to change the Confucian style of leadership, Tu Duc tried to understand where, within Confucianism, he had failed. However, the answers were no longer to be found in the tenets of this doctrine. Rather than facing the problem of the French directly, Tu Duc, like Thieu Tri before him, put his energy into fighting the peasant uprisings directed against him all over northern Vietnam and even closing in on the capital at Hue.
The French had their own plan for Vietnam, Cambodia, and Laos, a region which they later termed Indochina. Within Vietnam, they had already attracted a serious religious following of Catholic Vietnamese who considered themselves martyrs and were willing to help the French. At the same time, French explorers were mapping the region and developing a trade network between Indochina and Europe. With knowledge of strife occurring in the north, the French concentrated their efforts on the south which they easily invaded in 1859. They forced Tu Duc to sign a series of treaties which gave away much of the emperor's power. When he died, the French placed themselves in power, a place they remained for the next half-century.