Shares have rebounded the past two weeks, but declines this month and in April still mark a sharp reversal for Vietnam. Until recently, global investors had piled into the high-flying frontier market due to its fast economic growth and optimism about government-led reforms.

The Hochiminh VN Index is down 3.4% in May with one trading day left, near a three-month low, and is on track for its worst month in nearly a year. Meanwhile, other regional markets have rallied, offering investors high yields and soaring stock prices. Even in Thailand, where the economy has stalled amid months of political turmoil capped by a military coup, stocks have held up relatively well.

In Vietnam, local money managers have turned especially skittish, selling around $80 million of local shares in the month through Tuesday, compared with net buying of roughly the same amount by foreigners, according to data from Ho Chi Minh Securities Co.

"Domestic investors clearly panicked" over the tensions with China, said Johan Kruimer, the brokerage's managing director for institutional clients. Still, "foreigners took the opportunity to step in at the lower levels."

The Ho Chi Minh index had gained 16% on the year through April 9, making it one of Asia's best performers, but Vietnamese government warnings on investors borrowing to buy securities prompted a sharp selloff that month.

After the market stabilized briefly, the selloff accelerated May 8—the benchmark fell 5.9% that day—one day after Vietnam released video footage showing Chinese vessels ramming into and firing water cannons at Vietnamese vessels near an oil rig that a Chinese state energy company had placed in contested waters off Vietnam's coast.

The tensions sparked anti-Chinese protests in Vietnam, some of which turned violent on May 13-14, leaving at least three Chinese nationals dead and hundreds of foreign-owned factories damaged. Beijing condemned the violence and dispatched transportation to evacuate thousands of its citizens.

Since the May 8 selloff, though, the market has slowly regained ground, and now sits just two points below where it was on May 7.

"The China-Vietnam differences of opinion have been part of the regional political fabric for a long time now," said Bill Stoops, chief investment officer at Dragon Capital, which manages around $1 billion in Vietnam. But "the Vietnamese government accidentally let things boil over too much."

Phong Nguyen, head of institutional services at VN Direct, one of the country's largest brokerages, said local investors worried the protests could get out of hand.

"We always bet on having a very stable political system," he said. After the clashes, though, Vietnamese retail investors "just wanted to keep cash to be safe."

Economists say it is too early to judge the economic impact of the flare-up between Vietnam and China. While Vietnam depends more on other Asian countries such as Taiwan and South Korea for foreign direct investment, it has strong supply-chain links to China.

"At this point in time, we doubt the dispute will escalate into war, which means a limited near-to-medium term impact on Vietnam's economy," said Kok Fook Meng, who manages Lion Global Investors' Vietnam fund.

Mr. Kok said Lion Global, which oversees $25 billion globally, will maintain its position in Vietnam and is looking to buy selectively if the market falls further.

Local institutional funds agree. "We remain positive ex- the maritime situation," said Kevin Snowball, chief executive of PXP Asset Management, which oversees about $140 million in Vietnam and decided not to sell assets during the clash with China. "Hopefully the minor unrest of a couple of weeks ago will prove to have been contained in time to prevent economic damage," he said.

Some confidence has been restored and local investors are returning fast. The U.S.-traded Market Vectors Vietnam exchange-traded fund, which offers foreign investors access to some of Vietnam's largest companies, slumped as much as 16% from early April to early May, but regained most of those losses later in May. It was headed for a 2% gain for the month.

"Vietnam's stock market has this month been dominated largely by the dispute over the placement of the Chinese oil rig offshore Vietnam," said Giang Trung Kien, chief analyst with FPT Securities, who said foreign investors have been especially active in the market this month. "The market won't fall further next month as long as no military confrontation takes place."

By Jake Maxwell Watts & Vu Trong Khanh - The Wall Street Journal - May 29, 2014