The West's exposure in Vietnam and Vietnam's exposure to Westerners dated back to 166 BC with the arrival of merchants from the Roman Empire, to 1292 with the visit of Marco Polo, and the early 1500s with the arrival of Portuguese and other European traders and missionaries.[citation needed] Alexandre de Rhodes, a French Jesuit priest, improved on earlier work by Portuguese missionaries and developed the Vietnamese romanized alphabet Quốc Ngữ in Dictionarium Annamiticum Lusitanam et Latinum in 1651.
Between 1627 and 1775, two powerful families had partitioned the country: the Nguyễn Lords ruled the South and the Trịnh Lords ruled the North. The Trịnh-Nguyễn War gave European traders the opportunities to support each side with weapons and technology: the Portuguese assisted the Nguyễnin the South while the Dutch helped the Trịnh in the North.
In 1784, during the conflict between Nguyễn Ánh, the surviving heir of the Nguyễn Lords, and the Tây Sơn Dynasty, a French Catholic Bishop, Pigneaux de Behaine, sailed to France to seek military backing for Nguyễn Ánh. At Louis XVI's court, Pigneaux brokered the Little Treaty of Versailles which promised French military aid in return for Vietnamese concessions. The French Revolution broke out and Pigneaux's plan failed to materialize. Undaunted, Pigneaux went to the French territory of Pondicherry, India. He secured two ships, a regiment of Indian troops, and a handful of volunteers and returned to Vietnam in 1788. One of Pigneaux's volunteers, Jean-Marie Dayot, reorganized Nguyễn Ánh's navy along European lines and defeated the Tây Sơn at Qui Nhơn in 1792. A few years later, Nguyễn Ánh's forces captured Saigon, where Pigneaux died in 1799. Another volunteer, Victor Olivier de Puymanel would later build the Gia Định fort in central Saigon.
After Nguyễn Ánh established the Nguyễn Dynasty in 1802, he tolerated Catholicism and employed some Europeans in his court as advisors. However, he and his successors were conservative Confucians who resisted Westernization. The next Nguyễn emperors, Ming Mạng, Thiệu Trị, and Tự Đức brutally suppressed Catholicism and pursued a 'closed door' policy, perceiving the Westerners as a threat, following events such as the Lê Văn Khôi revolt when a French missionary Joseph Marchand encouraged local Catholics to revolt in an attempt to install a Catholic emperor. Tens of thousands of Vietnamese and foreign-born Christians were persecuted and trade with the West slowed during this period. There were frequent uprisings against the Nguyễns, with hundreds of such events being recorded in the annals. These acts were soon being used as excuses for France to invade Vietnam. The early Nguyễn Dynasty had engaged in many of the constructive activities of its predecessors, building roads, digging canals, issuing a legal code, holding examinations, sponsoring care facilities for the sick, compiling maps and history books, and exerting influence over Cambodia and Laos. However, those feats were not enough of an improvement in the new age of science, technology, industrialization, and international trade and politics, especially when faced with technologically superior European forces exerting strong influence over the region. The Nguyễn Dynasty is usually blamed for failing to modernize the country in time to prevent French colonization in the late 19th century.
French invasion
Main articles: Cochinchina campaign, Truong Dinh, Phan Dinh Phung, Nguyen Trung Truc, Phan Thanh Gian, Tonkin campaign, and Sino-French War
Under the orders of Napoleon III of France, French gunships under Rigault de Genouilly attacked the port of Đà Nẵng in 1858, causing significant damage, yet failed to gain any foothold, in the process being afflicted by the humidity and tropical diseases. De Genouilly decided to sail south and captured the poorly defended city of Gia Định (present-day Ho Chi Minh City). From 1859 to 1867, French troops expanded their control over all six provinces on the Mekong delta and formed a colony known as Cochin China. A few years later, French troops landed in northern Vietnam (which they called Tonkin) and captured Hà Nội twice in 1873 and 1882. The French managed to keep their grip on Tonkin although, twice, their top commanders Francis Garnier and Henri Riviere, were ambushed and killed. France assumed control over the whole of Vietnam after the Sino-French War (1884–1885). French Indochina was formed in October 1887 from Annam (Trung Kỳ, central Vietnam), Tonkin (Bắc Kỳ, northern Vietnam), Cochin China (Nam Kỳ, southern Vietnam, and Cambodia, with Laos added in 1893). Within French Indochina, Cochin China had the status of a colony, Annam was nominally a protectorate where the Nguyễn Dynasty still ruled, and Tonkin had a French governor with local governments run by Vietnamese officials.
After Gia Định fell to French troops, many Vietnamese resistance movements broke out in occupied areas, some led by former court officers, such as Trương Định, some by peasants, such as Nguyễn Trung Trực, who sank the French gunship L'Esperance using guerilla tactics. In the north, most movements were led by former court officers and lasted decades, with Phan Đình Phùng fighting in central Vietnam until 1895. In the northern mountains, the former bandit leader Hoàng Hoa Thám fought until 1911. Even the teenage Nguyễn Emperor Hàm Nghi left the Imperial Palace of Huế in 1885 with regent Tôn Thất Thuyết and started the Cần Vương, or "Save the King", movement, trying to rally the people to resist the French. He was captured in 1888 and exiled to French Algeria. Decades later, two more Nguyễn kings, Thành Thái and Duy Tân were also exiled to Africa for having anti-French tendencies. The former was deposed on the pretext of insanity and Duy Tân was caught in a conspiracy with the mandarin Tran Cao Van trying to start an uprising.
20th century
In the early 20th century, Vietnamese patriots realized that they could not defeat France without modernization. Having been exposed to Western philosophy, they aimed to establish a republic upon independence, departing from the royalist sentiments of the Cần Vương movements. Japan's defeat of Russia in the Russo-Japanese War served as a perfect example of modernization helping an Asian country defeat a powerful European empire.
There emerged two parallel movements of modernization. The first was the Đông Du ("Go East") Movement started in 1905 by Phan Bội Châu. Châu's plan was to send Vietnamese students to Japan to learn modern skills, so that in the future they could lead a successful armed revolt against the French. With Prince Cường Để, he started two organizations in Japan: Duy Tân Hội and Việt Nam Công Hiến Hội. Due to French diplomatic pressure, Japan later deported Châu to China.
Phan Chu Trinh, who favored a peaceful, non-violent struggle to gain independence, led the second movement Duy Tân ("Modernization"). He stressed the need to educate the masses, modernize the country, foster understanding and tolerance between the French and the Vietnamese, and a peaceful transition of power.
The early part of the 20th century also saw the growing in status of the Romanized Quốc Ngữ alphabet for the Vietnamese language. Vietnamese patriots realized the potential of Quốc Ngữ as a useful tool to quickly reduce illiteracy and to educate the masses. The traditional Chinese scripts or the Nôm script were seen as too cumbersome and too difficult to learn. The use of prose in literature also became popular with the appearance of many novels; most famous were those from the literary circle Tự Lực Văn Đoàn.
Main articles: Viet Nam Quoc Dan Dang and Yen Bai mutiny
As the French suppressed both movements, and after witnessing revolutionaries in action in China and Russia, Vietnamese revolutionaries began to turn to more radical paths. Phan Bội Châu created the Viet Nam Quang Phuc Hoi in Guangzhou, planning armed resistance against the French. In 1925, French agents captured him in Shanghai and spirited him to Vietnam. Due to his popularity, Châu was spared from execution and placed under house arrest until his death in 1940. In 1927, the Việt Nam Quốc Dân Đảng (Vietnamese Nationalist Party), modeled after the Kuomintang in China, was founded. In 1930, the party launched the armed Yen Bai mutiny in Tonkin which resulted in its chairman, Nguyen Thai Hoc and many other leaders captured and executed by the guillotine.
Marxism was also introduced into Vietnam with the emergence of three separate Communist parties; the Indochinese Communist Party, Annamese Communist Party and the Indochinese Communist Union, joined later by a Trotskyist movement led by Tạ Thu Thâu. In 1930 the Communist International (Comintern) sent Nguyễn Ái Quốc to Hong Kong to coordinate the unification of the parties into the Vietnamese Communist Party with Trần Phú as the first Secretary General. Later the party changed its name to the Indochinese Communist Party as the Comintern, under Stalin, did not favor nationalistic sentiments. Nguyễn Ái Quốc was a leftist revolutionary living in France since 1911. He participated in founding the French Communist Party and in 1924 traveled to the Soviet Union to join the Comintern. Through the late 1920s, he acted as a Comintern agent to help build Communist movements in Southeast Asia. During the 1930s, the Vietnamese Communist Party was nearly wiped out under French suppression with the execution of top leaders such as Phú, Lê Hồng Phong, and Nguyễn Văn Cừ.
In 1940, during World War II, Japan invaded Indochina, keeping the Vichy French colonial administration in place as a Japanese puppet. In 1941 Nguyễn Ái Quốc, now known as Hồ Chí Minh, arrived in northern Vietnam to form the Việt Minh Front, short for Việt Nam Độc Lập Đồng Minh Hội (League for the Independence of Vietnam). The Việt Minh Front was supposed to be an umbrella group for all parties fighting for Vietnam's independence, but was dominated by the Communist Party. The Việt Minh had a modest armed force and during the war worked with the American Office of Strategic Services to collect intelligence on the Japanese. From China, other non-Communist Vietnamese parties also joined the Việt Minh and established armed forces with backing from the Kuomintang.