Media playback is unsupported on your device Media caption The BBC's Martin Patience says the brawl broke out in a private dormitory. This YouTube footage has not been independently verified.

Taiwan-based Foxconn Technology, a major supplier for Apple, has halted production at a plant in northern China after a fight broke out among workers.

Foxconn confirmed that a "personal dispute" escalated into an incident involving about 2,000 workers, injuring 40 of them.

Police later dealt with the situation near the facility in Taiyuan, which employs about 79,000 workers.

Foxconn has previously been accused of having poor conditions for its workers.

Investigation launched

Foxconn said the incident started on Sunday at about 23:00 local time (15:00 GMT) in a dormitory near the Taiyuan manufacturing facility in Shanxi province.

Internet users in China posted pictures on microblog sites which they said had been taken at the scene showing windows of nearby shops smashed and police vehicles overturned.

Some photos showed police and paramilitary officers in riot gear being deployed to the scene.

About 40 people were taken to hospital and a number of individuals have been arrested, the company said.

Image caption The official Xinhua news agency said 5,000 police had been sent to end the unrest

Under control

A senior government official from Taiyuan City was quoted by the official Xinhua news agency as saying that three of the injured people were in a serious condition.

The official also said that an initial investigation had found that the fighting had been a clash between workers from Shandong Province and Henan Province.

The Xinhua agency reported that the dispute had been brought under control by 5,000 policemen by 09:00 local time on Monday.

Foxconn said that the dispute did not appear to have been work-related.

But unverified messages on the Twitter-like social network Weibo suggested that violence from security guards may have sparked the unrest.

One said that four or five security guards had beaten a worker almost to death, while another said that rioting workers had been targeting security guards who had earlier beaten some of their colleagues.

There was no independent confirmation of these messages.

The plant makes electronic components for cars and consumer devices.

Earlier in the year a fight broke out in a restaurant at a Foxconn plant involving about 100 workers.

State media reported that the incident in Chengdu "was triggered by a conflict" between a group of workers and a restaurant owner.

A string of suicides at Foxconn last year put the spotlight on working conditions at its factories.

Foxconn has since agreed to reduce hours, protect pay and improve staff representation.