Workers building a massive Samsung factory in Vietnam battled police and torched motorbikes on Thursday, in a rare outbreak of labour violence.

Eleven people were injured in the incident, which Samsung said occurred after a disagreement between workers and security guards over safety protocols at the site.

Samsung and other tech companies such as Intel and Nokia are increasingly moving production to Vietnam, where labour costs are cheaper than in neighbouring China. Vietnam's Communist rulers are encouraging them with tax breaks, eager to move away from traditional exports of clothes, shoes and shrimp to higher-value products.

Bystanders took video footage of the riot at the complex under construction in Thai Nguyen province in northeast Vietnam and quickly posted it on YouTube.

Motorbikes and containers housing security guards were set alight, sending thick smoke over the complex. People threw rocks at police in riot gear who huddled together. Local official Duong Ngoc Long said police restored order after three hours.

One police officer was among the injured, who were hospitalized with wounds from knife attacks and flying rocks, said a doctor from a nearby military hospital who didn't give his name because he was not authorized to speak to the media.

"We will do our utmost to prevent any such incidents from recurring in the future," Samsung said in a statement. It said construction was unaffected.

Vietnam's tech exports, mostly phones and tablets assembled from parts made in China and elsewhere, increased sharply over the last three years, but the country's trade remains dominated by less sophisticated products.

Samsung is making the country of 90 million people a major manufacturing base for its smartphones.

According to South Korean media, the company has invested $2 billion in the factory, construction of which started last year. It has another functioning plant elsewhere in the north.