LANG SON, Vietnam -- She was 14 when Chinese artillery fire echoed across the hills around her home in northern Vietnam, and hundreds of thousands of Chinese soldiers swarmed across the border. She remembers sprinting with her parents through the peach trees, her waist-length hair flying, as they fled the invaders. They ran straight into the enemy.
Her mother was shot and killed in front of her; minutes later, her father was wounded. "I was horrified. I didn't think I would survive. The bullets were flying all around. I could hear them and smell the gunfire," said Ha Thi Hien, now 49, fluttering her hands so they grazed her head to show how close the bullets came on the first day of the short, brutal war.
The conflict between China and Vietnam in 1979 lasted less than a month. But the fighting was so ferocious that its legacy permeates the current sour relations between the two Communist countries now at odds over hotly contested waters in the South China Sea.
Both sides declared victory then, though neither side prevailed, and both armies suffered horrendous losses.
If a war erupted over territorial rights and the recent positioning of a Chinese oil rig off the coast of Vietnam in the South China Sea, China, with its increasingly modernized navy, likely would win, military experts say. So in a situation some liken to that of Mexico astride the United States, Vietnam must exercise the art of living alongside a powerful nation, a skill it has practiced over several thousand years of intermittent occupation and more than a dozen wars with China.
But with China, far richer, militarily stronger and more ambitious than at any time the two countries have faced each other in the modern era, how far to needle Beijing, when to pull back, and how to factor in the United States are becoming trickier.
During the current tensions, the anti-Chinese sentiments of the Vietnamese people seem to have run ahead of the country's ruling Politburo.
"People in Vietnam want to be outside China's grip," said Pham Xuan Nguyen, chairman of the Hanoi Literature Association, who protested against the oil rig outside the Chinese Embassy in Hanoi. "But the Vietnamese people are wondering what is the strategy of the government, and wondering if the government is really against China or compromising."
In 2012, the U.S. defense secretary, Leon E. Panetta, visited Cam Ranh Bay, the site of a major U.S. base during the Vietnam War, but the Vietnamese military, still mindful of that war and years of antagonistic relations after it ended in 1975, has kept its distance.
Part of the aloofness is the result of a U.S. executive order that prohibits the sale of U.S. weapons to Vietnam, a vestige of the Vietnam War. But Washington is showing increasing interest in lifting the ban, and the expected new U.S. ambassador to Vietnam, Ted Osius, who is awaiting confirmation from the Senate, said in testimony last month that easing the embargo should be considered.
For the moment, Vietnam buys weapons mainly from Russia, Israel and India. It has taken delivery of two Kilo-class submarines from Russia, and has ordered four more. Japan has pledged to provide coast guard vessels. In a move intended to encourage Vietnam to accept more from Washington, Secretary of State John Kerry announced $18 million in nonlethal aid for Vietnam's maritime security during a visit in December.
Vietnam does not expect, or want, intervention by the United States, said Dang Dinh Quy, president of the Diplomatic Academy of Vietnam. "We don't expect help from anyone," he said. "We are confident we can do it ourselves. We will keep to current strategies of trying to prevent a clash, and if it happens we will try to deal with it. We welcome all users of the South China Sea as long as they are conducive to preserving peace, stability and a legal order in the region."
The shadow of the 1979 war, ordered by Chinese leader Deng Xiaoping to punish Vietnam for its invasion of Cambodia, endures in places along the border. The memories are strong not only because of the death toll but also because the Chinese pummeled towns and villages as they withdrew, destroying schools and hospitals, in what the Chinese military later called a "goodbye kiss."
Lang Son has since been rebuilt, and modest high-rises emblazoned with neon give it the feel of a prosperous trading post. But people here still remember a river full of bodies, both Vietnamese and Chinese, and how long it took for the terrible smell to go away. The combined death toll has been estimated to be at least 50,000 troops, along with 10,000 Vietnamese civilians.
After China and Vietnam normalized relations in 1991, the government erased all official commemorations of the 1979 fighting, a contrast to the copious memorials to Vietnam's wars against the French and the Americans in which the Chinese gave vital assistance.
Relations between the fraternal Communist parties thawed, cross-border business flourished and memories were eclipsed.
Those memories resurfaced two months ago with the arrival of the Chinese oil rig in waters claimed by both countries off Vietnam's coast. There were daily skirmishes between Chinese and Vietnamese coast guard vessels, which led to anti-Chinese riots in Vietnam that left four Chinese citizens dead and damaged foreign-owned factories.