Along with the Sino-Vietnamese war of 1979, the Communist Vietnamese invasion of Communist Cambodia in that same year was another bout of infighting among Asian Reds which was potentially confusing for western observers. Almost everyone knows about the genocidal regime run by the Khmer Rouge in Cambodia in the late 1970s, but far fewer people are aware of the chain of events which led America's enemies in Vietnam to sweep the Khmer Rouge from power, or that the United States continued to back the genocidal Cambodians for a decade afterwards.
There had been a time when the Vietnamese and Cambodian communists had all been part of the same party and they had spent decades fighting western-backed regimes in their respective countries, as had their friends in Laos. While the Cambodian Khmer Rouge had not fought the Americans, they had received widespread support from the North Vietnamese, who had virtually taken over parts of Cambodia and used them as staging areas to rest and train before attacking South Vietnam.
It was this virtual annexation of parts of Cambodia that led Richard Nixon to order American and South Vietnamese troops into Cambodia in 1970, by which time the Viet Cong and Khmer Rouge were co-operating more closely than ever before; bizarrely for the Cambodians, they found themselves in the strange position of being allowed to use parts of their own country which were under the control of the North Vietnamese as a staging area of their own to attack the western-backed government in Phnom Penh. While glad of the assistance, it irked them to see the Vietnamese virtually annexing parts of Cambodia for their own ends. As both communist movements neared success in their own countries in 1975, the Khmer Rouge began to distance themselves from the Vietnamese more and more, purging Vietnamese-trained personnel from their ranks.
The final victory for both Communist movements came in spring 1975 when North Vietnamese armoured columns swept into Saigon and Khmer troops marched into Phnom Penh. The Khmer Rouge declared it to be Year Zero and prepared to embark on a root-and-branch revolution in Cambodia which was accompanied by one of the worst genocides of the twentieth century, in which some two million people died. Not wanting to be distracted from their work, the Khmer Rouge were fearful that the Vietnamese Communists were plotting to dominate them and establish a federation of states which would be run from Hanoi. Not only did this offend Khmer nationalism, but it was also a risk to the radical revolution that the Cambodians wanted to carry out - Vietnam was moving into the more conservative Soviet camp, while the genocidal Khmer found their home under the zealous wings of Mao Zedong.
It's a commonplace of revolutionary history that radical regimes often end up turning their guns outwards - think of Napoleon's wars or the war against Iraq which followed the Iranian Revolution. The Khmer started doing the same, launching major attacks on Vietnam which had the rational aim of discouraging Vietnamese expansionism but surely were also rooted in the psychological pressure created by the extreme descent into violence inside Cambodia's borders. Whipping up a bit of nationalism wouldn't hurt the revolution, either. The Vietnamese seemed genuinely shocked that their erstwhile allies would turn on them, even though their own behaviour towards China was similar. Perceiving the Khmer Rouge as unhinged and sensing that the Chinese would continue to egg them on, the Vietnamese decided to take action. In December 1978, they invaded Cambodia, and by January 1979 it was all over.
After taking over Cambodia, the Vietnamese installed their own Communist regime in the capital, abruptly bringing the Cambodian genocide to an end. China soon attacked Vietnam in retaliation, but the Vietnamese stuck it out, their military prestige enhanced not just by how quickly they had mopped up the Cambodian army but also by the heavy price they made China pay when it came to its ally's aid. The Khmer Rouge melted into the hills and the jungle along with other non-Communist resistance groups to carry on an insurgency against the foreign-backed regime, causing the Vietnamese to station about 100,000 troops in the country for most of the following decade.
Aware of the brutality of the Khmer Rouge regime, the Vietnamese had expected that the rest of the world would thank them for kicking them out of power - but they were wrong. Humanitarian reasoning aside, their land grab continued to be perceived mostly through a Cold War lens - the Americans, who were trying to draw close to China to balance against the Soviet Union, put on their realpolitik goggles and saw a Soviet ally - not to mention their former battlefield enemy - annexing its neighbour. China saw the same, and the fact it was happening on their southern border didn't help either. Other countries in the region - including Thailand, whose border Vietnamese forces raided - worried that they might be next. It was the domino theory in action, although not in the way anyone had anticipated.
As a result of all of this opposition to the Vietnamese-backed regime, the Khmer Rouge actually continued to represent Cambodia at the United Nations until 1993, backed by most of the outside world. Vietnamese troops stayed in the country throughout the 1980s until the process of reform in the Soviet Union and the end of the Cold War radically shifted the geopolitical calculus of the region and the world.
Vietnam began to open up its economy as Soviet aid was cut, and the relaxation of tensions between the Soviet Union and China helped to defuse the situation. The Vietnamese began to realize that while the Soviet Union was not long for this world, China would be there in their northern border for ever, and they had to adjust their policies accordingly. In 1991, a peace settlement was reached and the path paved for Vietnamese troops to withdraw. Then in 1993, Cambodia got a fresh start thanks to UN-supervised democratic elections, and trials of the Khmer Rouge began in 2008. Its occupation of a neighbour at an end, Vietnam had been rewarded with the restoration of normal relations with the United States in 1995. The Cold War, and all the grief it had brought to south-east Asia, was finally over.