Violence has erupted in Vietnam as thousands rioted and set fire to factories in protest after China moved a giant oil rig to a disputed part of the South China Sea.

Chaos broke out at the industrial zones in Binh Duong and Dong Nai provinces where Taiwanese companies were torched, having been mistaken for Chinese-owned firms.

Vietnamese officials confirmed that factory gates were smashed and windows broken, while police said they were investigating similar incidents. The industrial parks are vital to Vietnam's sizeable manufacturing sector.

Vice-chairman of the Binh Duong People's Committee told journalists the protesters rioted over China's behaviour in the South China Sea.

"About 19,000 workers were demonstrating against China's violation of Vietnam's territorial waters," Tran Van Nam said.

"Some workers turned angry, destroying companies' gates and entering the compounds and asking other workers to join a strike."

Chairwoman of the Taiwan Chamber of Commerce in Vietnam, Serena Liu, said that some people had been trapped in the industrial parks during the chaos.

"Everyone is terrified and scared," she said. "Some people tried to drive out of Binh Duong, but looters had put up road blocks."

In the wake of the violence, sports shoe maker Yue Yuen, which supplies global sports brands, said it had suspended production in Vietnam.

The protests erupted a day after US Secretary of State John Kerry described China's behaviour in the region as "provocative". China urged the US to be "cautious", and "objective" in its approach to the South China Sea disputes.

Tensions escalated in the region after China deployed a huge oil rig in a disputed part of the South China Sea Vietnam claims as its own territory. Vietnam and China accused each other of instigating clashes by ramming each other's ships close to the Paracel Islands.

The waters surrounding the chain of islands are thought to be rich in resources although they remain largely unexplored. China and Vietnam shared governance of the islands until they fought a brief war in 1974, after which China assumed control of the whole region. Vietnam has since renewed its claim to the islands.

Meanwhile, anti-China sentiment escalated in the Philippines after the government in Manila accused Beijing of grabbing land on a reef in disputed islands elsewhere in the South China Sea.

China claims almost all of the South China Sea, an area thought to be extremely rich in energy and mineral deposits and a vital shipping route.

Vietnam, the Philippines, Malaysia, Brunei and Taiwan have also laid claims to parts of the sea.