Malaysian police arrested 42 foreigners after nearly 1,000 workers rioted at an electronics goods factory Tuesday. The workers, mostly Nepalese nationals, were protesting poor working conditions, an endemic issue at plants employing foreign workers in the Southeast Asian country.

The rioting sparked fires and destroyed components inside the factory, which is located in the southern industrial hub of Johor state. The factory was run by JCY International, a Malaysian company that manufactures parts for electronics giants such as Samsung Electronics Co Ltd (KRX:005935), Hitachi Ltd (TYO:6501) and Western Digital Corp (NASDAQ:WDC).

The workers in the factory had accused JCY of neglecting working conditions at the facility following the death of an employee last week after complaining of chest pain, Reuters reported, citing local news reports. The Johor factory reportedly suspended operations on Wednesday.

“This was caused by a misunderstanding between the employer and employees over the terms of their work,” Mohad Idris Samsuri, the district's deputy police chief, told Reuters, adding that the arrested men would be charged under the country's anti-rioting law.

Meanwhile, JCY issued a statement to investors, saying that the conflict would not impact the company’s business.

“The company is currently taking active steps and measures to address the above matter and to reach an amicable settlement with the workers,” JCY reportedly said in the statement.