OSAKA -- Sharp has eliminated the jobs of more than 3,000 foreign temporary workers in Japan as the company moves production of iPhone sensors to a Chinese plant owned by parent Foxconn.

The deep cuts come as Japan debates whether to bring in more foreign workers amid a national labor shortage, and they illustrate how such employment is often at the mercy of manufacturers' production cycles.

Sharp's Kameyama plant in western Japan won a contract to assemble sensor components for facial recognition features on the iPhone X, which went on sale in November 2017. The Osaka-based company ramped up hiring of foreign workers, many of Japanese descent, that summer before starting production, only to reverse course this year.

"The layoffs came as a shock," said a Japanese-Bolivian woman who was one of four foreign workers attending a news conference Monday in Tokyo held by labor groups.

Apple is thought to have procured the iPhone sensor components from Sharp and South Korea's LG group. But a difficult assembly process led to shipment delays that were partly to blame for shortages when the phone made its debut.

Apple ranks as the biggest customer for Foxconn, the Taiwanese electronics manufacturer that trades as Hon Hai Precision Industry, constituting more than half of its sales. Foxconn Chairman Terry Gou, concerned about the production lapses at Sharp, visited Japan in fall 2017 to take direct charge of the Kameyama plant.

Sharp hired more temporary employees to increase output. The number of temporary foreign workers at Kameyama peaked at roughly 4,000 in late 2017. This year, however, Foxconn decided to move sensor production to a group factory in China.

The layoffs at Kameyama followed. Though the factory continues to produce parts for smartphone cameras -- in addition to liquid crystal display panels, whose sales are brisk -- the number of foreign workers on the payroll appears to have fallen to only 500 to 600 as of the summer.

Foreign employees who used to work in Sharp's sensor factory speak at a news conference Monday. Workers groups have called their dismissal a labor issue.

The company will continue design development for sensor components but has lost revenue as a result of the production shift to Foxconn's Chinese plant. Sharp in October downgraded its revenue forecast for the year ending in March by 200 billion yen ($1.76 billion) to a total of 2.69 trillion yen, owing partly to the loss of production at Kameyama.

Components like parts for smartphone sensors became an area of concentration for a struggling Sharp as it embarked on a revival after being bought by Foxconn in summer 2016. Under its Taiwanese parent, Sharp has made other cuts to domestic operations, including a decision this year to end refrigerator production near Osaka.

All employees cut at Kameyama were foreigners who held working status in Japan, with the majority being of Japanese descent.

Those in attendance at Monday's news conference included two Japanese-Peruvian individuals and a Japanese-Brazilian. They worked at Kameyama on one- to two-month contracts through employment subcontractors like Human Holdings and were not directly employed by Sharp. The former employees said they were laid off between July and September and are currently looking for jobs.

A spokesperson for Sharp's president said Monday that the company had asked subcontractors to comply with all relevant laws and ordinances.

Foreigners with Japanese descendants up to two generations back were granted permanent residency or a similar status beginning in 1990. Like Japanese citizens, they are allowed to work in any field without restriction. That status contrasts with the limited work permissions for technical trainees and exchange students. The government, meanwhile, hopes to create a new residency status for unskilled labor to aid industries with a lack of hands.

Japan hosted 1.27 million foreign workers as of October 2017, with Brazilians and Peruvians, mostly of Japanese descent, accounting for 11% the total, the labor ministry says. But the flow of foreign workers with Japanese descent has often been treated like a faucet -- opened when labor is needed and closed when not.

After the financial crisis in 2008, the government gave these workers financial aid to leave Japan and did not allow them re-entry for work, only to reverse that policy as labor shortages grew severe in 2013.

Problems surrounding foreign labor hiring practices are not limited to Sharp. The auto industry and food product factories have many foreign workers with Japanese ancestry.