Vietnam smothered anti-China protests on Sunday with a massive security clampdown after deadly riots triggered by a territorial dispute with Beijing spooked investors and the country's authoritarian leadership alike.
As patrol ships from both country remained locked in a standoff close to a Chinese oil rig in a disputed patch of the South China Sea, Beijing said it has evacuated 3,000 nationals from Vietnam and was sending the first of five ships to pull out others wanting to leave.
China's decision to deploy the massive oil rig on May 1 has been widely seen as it one of its most provocative steps in a gathering campaign to assert its sovereignty in the waters. It triggered fury in Vietnam and the worst breakdown in ties between Hanoi and Beijing in years.
Last weekend, Vietnam allowed anti-China protests that drew thousands of people, a rare step that allowed it to amplify state anger against Beijing. Doing so was risky for authorities: dissident groups joined the protests, and by Tuesday and Wednesday, the rallies had morphed into riots targeting factories believed to be owned by Chinese companies. Many of those hit were Taiwanese. Two Chinese nationals were killed and more than 100 wounded.
Vietnam's state-security apparatus on Sunday ensured no one was able to protest. Thousands of police and security officers flooding southern Ho Chi Minh City and the capital, Hanoi. Police were posted outside well-known dissidents houses, preventing them from leaving, according to activists.
In Ho Chi Minh, police detained several demonstrators after dragging them from a park close to the city's cathedral. Authorities in Hanoi closed off streets and a park close to the Chinese Embassy, while police barking into bullhorns shoved journalists and protesters away.
"I want to send a message that if we don't stop China today, tomorrow it will be too late," said demonstrator Dao Minh Chu, as he was pushed away from the park near China's embassy, where last week around 500 people gathered without interference from authorities. Those protests were covered enthusiastically by state media, a clear sign of state sanction.
China has loudly demanded that Hanoi protect Chinese people inside Vietnam, which is heavily dependent on Beijing economically. Hundreds of Chinese have left by commercial flights and across the land border into Cambodia, although there has been calm since Thursday.
On Sunday, China said it dispatched to Vietnam a passenger ship capable of carrying 1,000 people, the first of five vessels it planned to send to complete an evacuation on top of 3,000 nationals who had left earlier.
With Chinese travelling in increasing numbers, Beijing is under pressure to protect them overseas.
A Taiwanese steel mill attacked on Wednesday employed 1,000 Chinese workers, who can be cheaper to hire and easier to manage than Vietnamese laborers.
Yang Yang, a political scientist at the China University of Political Science and Law in Beijing, said there were so many Chinese working in Vietnam that sending ships might more practical than planes. "It can also appease the unhappiness of the Chinese public over the violence against Chinese nationals in Vietnam," he said.
In recent years, foreign companies attracted by low wages and a reputation for safety have flocked to Vietnam, opening factories making everything from sneakers to smartphones. The government is aware that last's week violence threatens that vital economic cog, as well as chipping away at its authority by showing it can't keep order - an important part of its compact with a population denied basic rights.
On Saturday, top Vietnamese security official Lt. Gen. Hoang Kong Tu vowed to ensure the safety of all foreign investments and citizens in the country, including those from China. More than 1,000 people have been arrested in connection with the violence, which authorities have blamed on "extremists."
China and Vietnam have growing business links and share a political ideology and a commitment to authoritarianism, but they also have a long history of bad blood. Many Vietnamese harbor deep resentment over what they see as China's bullying and economic exploitation of Beijing's far smaller neighbor.
China has been much more assertive in pressing its territorial claims in recent years, often bringing into it into dispute with Vietnam and the Philippines. Spats have broken out over fishing rights and oil exploration missions in recent years, but the placement of the rig 220 kilometers (136 miles) off the coast of Vietnam was considered especially provocative.
Hanoi sent patrol ships to confront the rig and scores of Chinese vessels protecting it, and they remained locked in a tense standoff. Neither side has shown any sign of withdrawing their ships or willing to compromise.
Vietnam's government routinely arrests free speech activists and others challenging one-party rule. Anti-China protests are one of the few opportunities for public gatherings in Vietnam and also attract dissident groups, who often claim Hanoi is too soft on Beijing.
Several well-known activists said they had been prevented from leaving their homes on Sunday.
"I think the best way is to allow people to protest," said La Viet Dung, a frequent anti-China protester, adding that police visited him late Saturday asking him not to attend. "They say they are preventing people from protesting because they are worried about extremist actions and violence, but that is not logical."