A former top official at Vietnam's embassy in Beijing, Duong Danh Dy, warned from early 1978 that the bilateral relationship between Hanoi and Beijing was worsening by the day.
In July 1978, after what Beijing considered mistreatment of ethnic Chinese living in Vietnam, China halted assistance to its neighbour, prompting Hanoi to sign a "co-operation and friendship" pact with Moscow soon after.
Around the same time Hanoi intensified its efforts to topple Beijing's ally, the Khmer Rouge's Maoist regime in Cambodia.
Chairman Deng vowed to "teach Vietnam a lesson".
Vietnam's Duong Danh Dy, referring to a televised news briefing by the Chinese leader in December 1978, recalled: "I would never forget his face when he described Vietnam as a 'hooligan'.
"At that stage, we all thought 'that's it, a war is no longer avoidable'," Mr Dy said.
"But deep down inside we still hoped, perhaps naively, that since Vietnam and China had been so close and brotherly, they [the Chinese] wouldn't turn on us so fast and so strongly."
Philip Short meets Chinese refugees returning from Vietnam in August 1978
Instead, Beijing mobilised hundreds of thousands of troops and volunteers in its largest military operation since the Korean War.
Vietnam, meanwhile, was in a difficult situation having to deal with its Cambodian conflict and reconstructing a near-collapsed economy.
We have been faithful to our promise not to bring up old events for the sake of the relationship between the two countries
Duong Danh Dy, ex-official at Vietnam's embassy in Beijing
Vietnam's former first deputy foreign minister, who was in office when the border war began, said his country's isolationism had left it vulnerable.
"We were too dependent on our ideological allies, and by that time the only ally we had was the Soviet Union," said Tran Quang Co.
"Being a small country living next to a big country, we needed more friends. We needed to expand our ties and diversify our relations."
China's "pedagogical war" lasted just over a fortnight, with both Vietnam and China claiming victory.
Though disputable, estimates suggest that up to 60,000 lives were lost on both sides.
As well as the loss of life, the trust and fraternity that the two communist parties had struggled to build during the previous half a century suffered a severe blow.
In his memoir Memories and Thoughts, Tran Quang Co cited Vietnam's late leader Vo Van Kiet as saying in 1991 - the year the two countries normalised their relationship - that China "was always a trap".
The mutual distrust has lingered through the years, occasionally flaring when bilateral disputes occur.
Vietnam saw mass protests in December 2007, when China reportedly announced plans to establish an administrative unit to govern the Spratly and Paracel islands - territories claimed by Vietnam.
A smaller demonstration took place when the Beijing Olympic torch reached Vietnam's Ho Chi Minh City.
China's actions in the South China Sea sparked protests in Vietnam
However, such protests are uncommon.
Hanoi is trying hard not to jeopardise the warming ties with its giant neighbour. Neither Vietnam nor China seem to wish to repeat the bitter experience of 1979.
With bilateral trade rapidly growing and a land border agreement expected to be finalised soon after 35 years of negotiations, some say relations between the two are the best they have ever been.
The Vietnamese government is therefore keeping a close eye on what the media write about Vietnam-China relations - especially sensitive issues such as border or territorial claims.
"China is getting stronger so Vietnam needs to learn more [cleverly] how to co-exist with it," said senior diplomat Le Cong Phung.
Last week, the newspaper Saigon Tiep Thi published an article by well-known journalist Huy Duc on the 1979 border war on its website. The story was removed within hours.
"We have been faithful to our promise not to bring up old events for the sake of the relationship between the two countries," said Duong Danh Dy, who is now one of Vietnam's leading China experts.
The official stance has been condemned by the public as too soft and too compromising.
Internet forums and personal blogs are flooded with anti-China comments as the anniversary of the border war approaches.
In the Du Lich newspaper, a recent essay slipped past the state censors, praising the "pure patriotism and proud spirit" of the anti-Chinese protesters in Hanoi and Ho Chi Minh City.
As this nationalistic flame burns, the question of whether it will spread like wildfire depends on both governments' policies towards each other.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.