Vietnam (, ; Việt Nam ), officially the Socialist Republic of Vietnam (Cộng hòa xã hội chủ nghĩa Việt Nam), is the easternmost country on the Indochina Peninsula. With an estimated million inhabitants, it is the 15th most populous country in the world. Vietnam is bordered by China to the north, Laos and Cambodia to the west, part of Thailand to the southwest, and the Philippines, Malaysia, and Indonesia across the South China Sea to the east and southeast. Its capital city has been Hanoi since the reunification of North and South Vietnam in 1976, while its most populous city is Ho Chi Minh City.
During the 3rd century BC, ancient Vietnamese people inhabited modern-day northern Vietnam and established the state of Âu Lạc. The independent state was annexed by Nam Việt in 179 BC. Nam Việt was subsequently annexed by the Han Empire and became part of Imperial China for over a millennium from 111 BC to 939 AD. An independent Vietnamese state emerged in 939 following Vietnamese victory in the battle of Bạch Đằng against the Southern Han. Successive Vietnamese imperial dynasties flourished as the nation expanded geographically and politically into Southeast Asia until the Indochina Peninsula was colonised by the French in the mid-19th century.
French Indochina saw the Japanese occupation in 1940 amidst the escalation of World War II. Following Japanese defeat in 1945, the Vietnamese fought French rule in the First Indochina War. On 2 September 1945, Vietnamese revolutionary leader Hồ Chí Minh declared Vietnam's independence from France and therefrom established a provisional communist state. After nine years of war, the Vietnamese declared victory in the decisive battle of Điện Biên Phủ in 1954. The nation was thereafter divided into two rival states, communist North—the Democratic Republic of Vietnam, and anti-communist South—the Republic of Vietnam. Conflicts intensified in the Vietnam War with extensive US intervention in support of South Vietnam from 1965 to 1973. The war ended with North Vietnamese victory in 1975.
North and South Vietnam were then reunified under a communist government in 1976. The newly established country remained impoverished and politically isolated until 1986 when the Communist Party initiated a series of economic and political reforms that facilitated Vietnamese integration into the world economy. By 2010, Vietnam had established diplomatic relations with 178 countries. Since 2000, Vietnam's GDP growth rate has been among the highest in the world. Its successful economic reforms resulted in its joining the WTO in 2007. Vietnam is also a member of the Association of Southeast Asian Nations (ASEAN), Asia-Pacific Economic Cooperation (APEC) and the Organisation Internationale de la Francophonie (OIF).
The name Việt Nam is a variation of Nam Việt (literally "Southern Việt"), a name that can be traced back to the Triệu dynasty of the 2nd century BC. The word Việt originated as a shortened form of Bách Việt, a group of people then living in southern China and Vietnam. The form "Vietnam" is first recorded in the 16th-century oracular poem Sấm Trạng Trình. The name has also been found on 12 steles carved in the 16th and 17th centuries, including one at Bao Lam Pagoda in Hải Phòng that dates to 1558. In 1802, Nguyễn Phúc Ánh (later become Emperor Gia Long) established the Nguyễn dynasty, and in the second year, he asked the Jiaqing Emperor of the Qing dynasty to confer him the title 'King of Nam Viet/Nanyue' (南越 in Chinese) after seizing Annam's ruling power but the latter refused since the name was related to Zhao Tuo's Nanyue which includes the regions of Guangxi and Guangdong in southern China by which the Qing Emperor decide to call the area as "Viet Nam" instead. Between 1804 and 1813, the name Vietnam was used officially by Emperor Gia Long. It was revived in the early 20th century by Phan Bội Châu's History of the Loss of Vietnam, and later by the Vietnamese Nationalist Party (VNQDĐ). The country was usually called Annam until 1945, when both the imperial government in Huế and the Việt Minh government in Hanoi adopted Việt Nam.