UPDATE 1-China's industrial profit growth slows amid high raw material prices

(Adds details, background)

BEIJING, June 27 (Reuters) - Profit growth at China's industrial firms slowed again in May as surging raw material prices squeezed margins and weighed on factory activity.

Profits at China's industrial firms rose 36.4% in May from a year earlier to 829.92 billion yuan ($128.58 billion) official data showed on Sunday.

That was a slowdown from the 57% surge reported in April, according to National Bureau of Statistics.

The world's second-largest economy has largely recovered from disruptions caused by COVID-19, but it faces new challenges such as elevated raw material costs and global supply chain crunches. Officials warn that China's recovery remains uneven.

Imbalances in profitability became prominent between upstream and downstream firms due to high commodity prices, said Zhu Hong, an official at the statistics bureau.

"The foundation for recovery is not yet solid," he said in a statement accompanying the data.

Profits grew rapidly in the metals, chemicals and petroleum sectors, while smaller and downstream enterprises saw much more pressure, Zhu said.

For the January-May period, industrial firms' profits grew 83.4% from the same period a year earlier to 3.42 trillion yuan.

Factory-gate inflation saw its fastest annual growth in over 12 years in May driven by surging commodity prices, posing risks to profit margins for mid- and downstream firms.

Chinese policymakers have stepped up efforts in recent weeks to cool runaway metals prices, including selling supplies from state reserves, but with global demand continuing to recover some analysts believe the moves will have only a limited impact.

China's official manufacturing data this week is expected to show weaker growth in activity in June, likely due to disruptions caused by COVID-19 flare-ups at the country's major southern ports. In addition, investors will be looking to trends in input costs and selling prices for any further signs of margin pressure.

Liabilities at industrial firms were up 8.2% year-on-year at the end of May, versus 8.6% growth a month earlier.

The industrial profit data covers large firms with annual revenues of over 20 million yuan from their main operations. ($1 = 6.4545 Chinese yuan renminbi) (Reporting by Gabriel Crossley; Editing by Kim Coghill and William Mallard)