BEIJING (Reuters) – China’s factory activity contracted for the first time in three months in August amid weakening demand, while power shortages and fresh COVID-19 flare-ups disrupted production, a private sector survey showed on Thursday.

The Caixin/Markit manufacturing purchasing managers’ index (PMI) slid to 49.5 in August from 50.4 in July, missing analysts’ expectation for 50.2.

The unexpectedly weak reading echoed China’s official PMI released on Wednesday, which was also below the 50-point mark that separates growth from contraction on a monthly basis.

“The economy is still slowly recovering from a widespread outbreak of COVID-19 in the first half of the year. Yet, local flare-ups and the punishing heatwave have disrupted the trend and created new downward pressures, posing a threat to the recovery,” said Wang Zhe, senior economist at Caixin Insight Group.

While factory production expanded in August, gains were marginal, reflecting subdued demand due to the sluggish real estate sector, COVID-19 control restrictions and power rationing in southwestern regions due to extreme heat and drought.

Demand remained bleak, with sub-indexes of new orders and new export orders returning to contraction following two months of expansion.

Manufacturers cut jobs for the fifth straight month to reduce costs, adding to worries about the weak labour market which are weighing heavily on consumption and consumer confidence. They also cut back on purchases of materials due to fewer new orders.

One bright spot was a modest drop in input prices, ending 26 months of increases that have sharply squeezed profit margins.

China’s economy narrowly escaped contraction last quarter due to widespread COVID-19 lockdowns, and economists say its nascent recovery is in danger of fizzling out amid fresh virus flare-ups and a deep crisis in the property sector.

The country’s cabinet last week rolled out a package of new economic stimulus measures, including billions of dollars worth of policy financing, to lift the faltering economy.

The central bank also cut three key lending rates in August in a bid to lower financing costs for companies and individuals.

But, as long as the country maintains its strict COVID policies, many analysts expect growth to remain subdued and have been cutting growth forecasts for this year and next.

The Caixin PMI is believed to focus on more export-oriented and small firms in coastal regions and is compiled by S&P Global from responses to questionnaires sent to purchasing managers in China.

(Reporting by Liangping Gao, Ellen Zhang and Ryan Woo; Editing by Kim Coghill)