China is sending five ships to Vietnam to evacuate its citizens as Vietnamese authorities thwarted anti-China protests after violent demonstrations resulted in two deaths and damage at factories.

More than 3,000 Chinese nationals had been evacuated as of Saturday, China's official Xinhua News Agency reported on Sunday, citing the Foreign Ministry. More than 290 were flown to Chengdu, Xinhua said, citing the ministry.

Hundreds of security forces in Hanoi and Ho Chi Minh City deterred Vietnamese from protesting the placement of an oil rig in disputed waters off Vietnam's coast after the government permitted unprecedented demonstrations that drew several thousand on May 11. Anti-China attacks on foreign-owned factories last week left two dead and about 140 injured, halting production lines and prompting Taiwanese and other workers to flee the country.

Vietnamese authorities, worried that uncontrolled demonstrations could lead to instability and harm the country's economy, prevented planned protests over the weekend as China sought to shift the spotlight to Vietnam's lack of order, said Le Hong Hiep, a lecturer at Vietnam National University in Ho Chi Minh City.

"The government is careful not to let the anti-China demonstrations cause collateral damage," he said in a phone interview. "Vietnam needs to assure China that it will protect its citizens. China is portraying itself as a victim and portraying the Vietnamese government as a source of tension."

Taiwan's foreign minister is urging Vietnam to compensate companies that were attacked. China called on Vietnam to protect the lives and property of Chinese nationals and organizations in the country.

Taiwan's President Ma Ying-jeou ordered additional planes to be on standby to bring Taiwan citizens home if necessary, according to an e-mailed statement from his office.

Vietnam's government says order has been restored. Prime Minister Nguyen Tan Dung, in a text message sent to Vietnamese on Sunday, urged citizens to "display patriotism peacefully," refrain from unlawful protests and "help the government to keep social order and security."

Three hundred protesters will soon be prosecuted, Vietnamese authorities said Sunday. Protesters damaged foreign-owned factories, mostly from Taiwan, during violent demonstrations in the southern province of Binh Duong and in central Vietnam.

Riot police are patrolling the Vietnam Singapore Industrial Park in Binh Duong province, where protesters attacked factories.