The factory riot that hit one of world’s largest electronics manufacturers this week in northern China was rooted in growing economic pressure and impatience with poor work conditions among the country’s vast pool of migrant workers, analysts say, adding that if grievances remain unaddressed, such incidents are likely to increase.

The riot, which began late Sunday, involved nearly 2,000 workers at a facility of Foxconn, a Taiwan-based manufacturing giant, which temporarily shut down the factory in response. The latest unrest coincides with signs of a slowdown in the Chinese economy, as well as the launch of a new iPhone by Apple, which depends on Foxconn as its main Chinese supplier.

“Such riots have become in some ways inevitable,” said Liu Kaiming, a labor expert in Shenzhen, the hub of China’s manufacturing plants. “It’s no longer simply a matter of raising the wages.”

Foxconn and police said the cause of the latest riot was being investigated, the Associated Press reported. The company did not respond to labor groups’ claims about working conditions.

The young migrant workers whose labor has fueled much of the growth of China’s economy and the global manufacturing sector have begun to change in demographics and desires. That labor pool is shrinking, according to experts, as workers from China’s provinces have become better educated and hold higher expectations for their lives.

“They aren’t just thinking about saving money to bring back to their villages anymore,” said Mary Gallagher, a China labor expert at the University of Michigan.

But the heavy demands of the factory jobs have not changed with the demographics, leaving many frustrated. Most of the jobs require little education or, in many cases, skill — only intensity.

“The companies haven’t figured out how to manage that intensity,” Gallagher said. “It’s intense because of the precision required. It’s intense because of how quickly technology changes and newer models are demanded. And while the number of workers is shrinking, you have the pressures on them mounting.”

Foxconn, in particular, has drawn attention in recent years because of its connection to Apple and the increasingly visible signs of unhappiness among its workers. A string of employee suicides in 2010 pushed the company to install netting to catch jumpers and take other steps. Pressure from its clients — especially Apple, which found itself under fire — also led it to raise wages and take other minor steps.

The Washington-based Fair Labor Association, which audited Foxconn’s Apple facilities in China after the criticism by rights groups, initially found serious violations of labor standards but reported in August that the manufacturer is improving working conditions ahead of schedule.

But the improvements are not enough, many Foxconn workers say. “It’s not about the money. . . . It’s a problem of management. It’s a mess. The guards often abuse their power over the workers,” said Wang Zhiqian, who used to work on Foxconn’s production line and now recruits workers for the company. “We attract many fewer workers now than in 2010. People would rather work at a hotel or other places. It’s not a lack of workers in these areas — it’s a problem of spiritual emptiness.

Wang and others describe workdays that routinely extend three hours into overtime, leaving little opportunity to do anything after hours but sleep. And they say there is little talk among the workers, who stew in their frustrations.

“It’s definitely not a happy place,” he said.Details slowly emerging about the riot this week seem to support those descriptions. According to witnesses and a report from the state-run China News Service — the most detailed official account of the riot — the incident was sparked by a clash between guards and workers at the factory, in the central northern city of Taiyuan.

A large number of workers had been brought from other areas of China about a month ago to work on a large electronics order. (Early claims that the work was related to Apple’s new iPhones have not been confirmed by either company.) When guards beat up workers from Shandong province, others from the same region fought back, igniting a full-fledged riot, according to the news agency’s account.

“This sort of circumstance is bound to lead to the eruption of certain issues in other factories of Foxconn sooner or later,” said Li Qiang, an activist with China Labor Watch.

In an earlier account, the state-run Xinhua News Agency reported that the riot was sparked by fighting between workers from Shandong province and others from Henan province.

An online account posted on China’s microblogs Wednesday morning by an alleged worker at the factory said a fight between workers from different provinces grew into a riot only after guards responded to the fight with force, severely injuring a worker from Shandong.

Liu Liu contributed to this report.