Third Indochina War: Cambodian-Vietnamese War: Phnom Penh falls to the advancing Vietnamese troops, driving out Pol Pot and the Khmer Rouge.

The CambodianVietnamese War (Khmer: -, Vietnamese: Chin tranh CampuchiaVit Nam), known in Vietnam as the Counter-offensive on the Southwestern border (Vietnamese: Chin dch Phn cng Bin gii Ty-Nam), and by Cambodian nationalists as the Vietnamese invasion of Cambodia (Khmer: ), was an armed conflict between Democratic Kampuchea, controlled by the Khmer Rouge, and the Socialist Republic of Vietnam. The war began with repeated attacks by the Liberation Army of Kampuchea on the southwestern border of Vietnam, particularly the Ba Chuc massacre which resulted in the deaths of over 3,000 Vietnamese civilians. On 25 December 1978, Vietnam launched a full-scale invasion of Kampuchea, and subsequently occupied the country and removed the government of the Communist Party of Kampuchea from power.

During the Vietnam War, Vietnamese and Cambodian communists had formed an alliance to fight U.S.-backed governments in their respective countries. Despite their cooperation with the Vietnamese, the Khmer Rouge leadership feared that the Vietnamese communists were planning to form an Indochinese federation, which would be dominated by Vietnam. In order to pre-empt any attempt by the Vietnamese to dominate them, the Khmer Rouge leadership began, as the Lon Nol government capitulated in 1975, to purge Vietnamese-trained personnel within their own ranks. Then, in May 1975, the newly formed Democratic Kampuchea began attacking Vietnam, beginning with an attack on the Vietnamese island of Ph Quc.In spite of the fighting, the leaders of reunified Vietnam and Kampuchea made several public diplomatic exchanges throughout 1976 to highlight the supposedly strong relations between them. However, behind the scenes, Kampuchean leaders continued to fear what they perceived as Vietnamese expansionism. Therefore, on 30 April 1977, they launched another major military attack on Vietnam. Shocked by the Kampuchean assault, Vietnam launched a retaliatory strike at the end of 1977 in an attempt to force the Kampuchean government to negotiate. The Vietnamese military withdrew in January 1978, even though its political objectives had not been achieved; the Khmer Rouge remained unwilling to negotiate seriously.

Small-scale fighting continued between the two countries throughout 1978, as China tried to mediate peace talks between the two sides. However, the two governments could not reach a compromise. By the end of 1978, Vietnamese leaders decided to remove the Khmer Rouge-dominated government of Democratic Kampuchea, perceiving it as being pro-Chinese and hostile towards Vietnam. On 25 December 1978, 150,000 Vietnamese troops invaded Democratic Kampuchea and overran the Kampuchean Revolutionary Army in just two weeks, thereby ending the excesses of Pol Pot's government, which had been responsible for the deaths of almost a quarter of all Cambodians between 1975 and December 1978 (the Cambodian genocide). Vietnamese military intervention, and the occupying forces' subsequent facilitation of international food aid to mitigate the massive famine, ended the genocide.On 8 January 1979 the pro-Vietnamese People's Republic of Kampuchea (PRK) was established in Phnom Penh, marking the beginning of a ten-year Vietnamese occupation. During that period, the Khmer Rouge's Democratic Kampuchea continued to be recognised by the United Nations as the legitimate government of Kampuchea, as several armed resistance groups were formed to fight the Vietnamese occupation. Throughout the conflict, these groups received training in Thailand from the British Army's Special Air Service. Behind the scenes, Prime Minister Hun Sen of the PRK government approached factions of the Coalition Government of Democratic Kampuchea (CGDK) to begin peace talks. Under diplomatic and economic pressure from the international community, the Vietnamese government implemented a series of economic and foreign policy reforms, and withdrew from Kampuchea in September 1989.

At the Third Jakarta Informal Meeting in 1990, under the Australian-sponsored Cambodian Peace Plan, representatives of the CGDK and the PRK agreed to a power-sharing arrangement by forming a unity government known as the Supreme National Council (SNC). The SNC's role was to represent Cambodian sovereignty on the international stage, while the United Nations Transitional Authority in Cambodia (UNTAC) was tasked with supervising the country's domestic policies until a Cambodian government was elected by the people. Cambodia's pathway to peace proved to be difficult, as Khmer Rouge leaders decided not to participate in the general elections, but instead chose to disrupt the electoral process by launching military attacks on UN peacekeepers and killing ethnic Vietnamese migrants. In May 1993, Sihanouk's FUNCINPEC movement defeated the Cambodian People's Party (CPP), formerly the Kampuchean People's Revolutionary Party (KPRP), to win the general elections. However, the CPP leadership refused to accept defeat, and announced that the eastern provinces of Cambodia, where most of the CPP's votes were drawn from, would secede from Cambodia. To avoid such an outcome, Norodom Ranariddh, the leader of FUNCINPEC, agreed to form a coalition government with the CPP. Shortly afterward, the constitutional monarchy was restored and the Khmer Rouge was outlawed by the newly formed Cambodian government.

The Sino-Vietnamese War (also known by various other names) was a border war fought between China and Vietnam in early 1979. China launched an offensive in response to Vietnam's actions against the Khmer Rouge in 1978, which ended the rule of the Chinese-backed Khmer Rouge. Both China and Vietnam claimed victory in the last of the Indochina Wars.

Chinese forces invaded northern Vietnam and captured several cities near the border. On 6 March 1979, China declared that the gate to Hanoi was open and that their punitive mission had been achieved. Chinese troops then withdrew from Vietnam. As Vietnamese troops remained in Cambodia until 1989, China was unsuccessful in its goal of dissuading Vietnam from involvement in Cambodia. Following the dissolution of the Soviet Union in 1991, the Sino-Vietnamese border was finalized. Although unable to deter Vietnam from ousting Pol Pot from Cambodia, China demonstrated that its Cold War communist adversary, the Soviet Union, was unable to protect its Vietnamese ally.