Smoldering nationalist anger in Vietnam exploded into frenzied violence in the suburbs of Ho Chi Minh City this week as thousands of rioters swept through industrial parks north of the city’s commercial hub, razing any factory believed to be Chinese owned. After more than two decades of peace, Beijing and Hanoi are at odds again.

China’s decision earlier this month to deploy a colossal, state-owned oil rig in fiercely contested waters off the Vietnamese coast appears to have succeeded in derailing the delicate relations between the countries.

The Chinese state press lashed out publicly at its southern neighbor on the heels of several maritime skirmishes last week, with one hawkish editorial calling on Beijing to teach Vietnam the “lesson it deserves.” The language closely resembled Chinese Premier Deng Xiaoping’s 1978 vow to teach Hanoi a “lesson” — and the echo is most unfortunate, because on that occasion the result was tens of thousands of deaths.

Like many Vietnamese of her generation, 75-year-old Dim remembers the conflict well. During the early hours of Feb. 17, 1979, she was asleep with her husband and children in their stone cottage in farmlands outside the northern city of Cao Bang, when the sky opened up with artillery shells.

“We didn’t have time to grab anything,” says Dim. “I just ran.”

It was the beginning of two years of homelessness and hunger as the starving family wandered through the mountains, begging and looking for refuge. Although decades have passed since the war’s end, she still shudders with loathing of the Chinese.

“Oh! I still hate them,” says Dim. “I’m still scared of the Chinese people, even now. I don’t know when I’ll next have to run.”

Official memories in Vietnam, however, are far more selective. While the country proudly celebrates its victorious wars against French and American forces, Hanoi remains largely quiet about the Sino-Vietnamese War. (China’s official stance is even more muted.) But that hasn’t kept the Vietnamese people from simmering with animosity toward their historic foe.

In the years following the U.S. withdrawal from Indochina, relations among the socialist nations of Southeast Asia violently deteriorated. Pogroms conducted against Vietnam’s ethnic Chinese community, and the overthrow by Vietnamese forces of Pol Pot — Beijing’s ally — set the stage for a showdown, as did Vietnam’s alliance with China’s great rival, the Soviet Union.

In the winter of 1978, when Deng Xiaoping made his threat of a “lesson,” more than 80,000 Chinese troops were sent across the border into Vietnam. Chinese Deputy Defense Minister Su Yu boasted of being able to take Hanoi in a week, but the untested and under-equipped People’s Liberation Army (PLA) met fierce resistance from battle-hardened Vietnamese forces deployed across the frontier’s limestone karsts. The Chinese were slaughtered by local militia from positions that had been utilized for centuries against invaders from the north.

“More Chinese soldiers were getting killed because they were fighting like it was the old times,” says Vietnamese veteran Nguyen Huu Hung, who witnessed the PLA’s human waves being mown down near the city of Lang Son. “They were in lines and just keep moving ahead … they didn’t run away.”

It would take just six weeks for Beijing to call off its “self-defensive counteroffensive.” Teaching the Vietnamese a lesson turned out to be a costly affair. Official casualty statistics have never been released by either Beijing or Hanoi; however, analysts have estimate that as many as 50,000 soldiers died during the confrontation.

“I heard that [China] said they wanted to teach Vietnam a lesson, but I can’t see what the lesson was,” says Hung. “Our job was to fight against them. But the losses, to be honest, were huge.”

When the Chinese began their pullout in early March, the retreating troops implemented a barbaric scorched-earth policy. Every standing structure in their path was destroyed. Any livestock they encountered were killed. Bitterness was sown.

Much like Dim, 59-year-old Nhung fears that someday the Chinese may return. Illiterate and impoverished, the ethnic Tay native remembers how Chinese troops gathered all the food stocks from surrounding villages and set their provisions ablaze. “It didn’t stop burning for 10 days,” she says.

After the invasion commenced, Nhung took shelter in musty limestone caverns that housed the surviving members of 14 local villages just a few miles south of the Chinese border. From time to time they would sneak out to forage for food.

“If they saw someone on the road, [the Chinese] would fire at them,” says Nhung, who now sells roasted sweet potatoes and bottles of tea to the occasional tourists who visit the caves she once cowered in.

By 1991, Vietnam was five years into its nascent economic reforms and in desperate need of friends. The Soviet Union was falling apart and the Americans were still holding firm to their embargo against the country, but China was rising. Hanoi repaired ties with Beijing, and for the past two decades the country’s ruling Communist Parties have largely remained as “close as lips as teeth,” as the old socialist slogan goes.

“They face similar challenges,” Tim Huxley, executive director of the International Institute for Strategic Studies’ Asia office, tells TIME. “I think there’s quite considerable empathy between them in that they’re both trying to manage a transition to economic and social modernity.”

However, one irritant in the relationship continues to fester — Beijing’s ambitious claim over a lion’s share of the South China Sea. With an estimated 24.7 trillion cu. ft. of proven natural gas and 4.4 billion barrels of oil waiting to be tapped, Vietnam’s economic future is dependent on having access to its share of those waters.

“What’s the party got? It’s not popular vote. It’s not the charismatic leadership of Ho Chi Minh,” says Carlyle A. Thayer, an emeritus professor at the University of New South Wales and a Vietnam specialist. “It has the vestiges of nationalism and standing up to foreign aggressors and it has economic growth.”

Sporadic protests against China have been increasingly common in the country in recent years, and when the government’s response to Chinese aggrandizement is viewed as weak, a new crop of rebel netizens harasses the party online for kowtowing to Beijing.

“If [the leadership is] shown to actually be compromising on national sovereignty for the sake of ideological solidarity with China, that is a very, very grave criticism of the party,” says Nayan Chanda, editor in chief of YaleGlobal online magazine.

In 2013, the Vietnamese government arrested more than 40 bloggers and activists for making such criticisms, among other things. Over 30 are still behind bars, according to Reporters Without Borders.

But following last week’s clashes over the oil rig, the Vietnamese government has taken a decidedly harder line with Beijing. During the ASEAN Summit in Burma, Prime Minister Nguyen Tan Dung blasted the Chinese for “slandering” Vietnam and escalating tensions in the region.

“National territory is sacred,” the Prime Minister told fellow heads of state. “Vietnam vehemently denounces acts of infringement and will resolutely protect our national sovereignty and legitimate interests in conformity with the international law.”

Large officially sanctioned demonstrations have also been allowed across the country, and the state press has, for the first time in recent memory, followed the unrest closely. On social media, users are decrying Chinese arrogance and some are calling for Chinese blood.

Veterans like Hung, however, show a little bit more caution. He knows only too well what happens when both sides push each other to the brink.

“I don’t think the rest of the society, especially young people, know enough about [that war],” says Hung.

But even Hung, who now has business in southern China, and who admits that politics hardly interests him, says he would pick up arms without hesitation if the Chinese ever came knocking again.

“Of course,” he says with a steady voice. “Because I’m Vietnamese.”

Contact us at letters@time.com.