BEIJING - China's factory gate inflation slowed amid sluggish commodity demand and faltering manufacturing activity, slowing from a four-month high in the previous month and fuelling worries growth in the world's second-largest economy is slipping.

Consumer prices, however, soared at their fastest pace in over a year, driven by elevated prices of pork and fruit due to supply issues stemming from the outbreak of African swine fever and poor weather conditions.

China's producer price index (PPI) in May rose 0.6% year-on-year, the National Bureau of Statistics (NBS) said in a statement on Wednesday, in line with analyst expectations and compared with a 0.9% uptick in April.

Producer inflation gauges in China, closely tracked by analysts and investors, are seen as bellwethers of industrial demand in the economy.

As the trade war between Washington and Beijing intensifies, investors and analysts are increasingly concerned the dispute could trigger a global recession.

China's May exports unexpectedly returned to modest growth in May but imports fell at the sharpest rate in nearly three years, adding to uncertainties.

The slowdown in producer price inflation was in line with downbeat factory activity seen in May. 

Price gains in oil and natural gas extraction, coal processing and ferrous metals eased last month.

Despite Beijing's effort to step up big-ticket infrastructure projects, sluggish demand has dragged growth in the prices of construction materials.

Steel consumption has waned as construction slackened amid high temperatures and rainfall. Steel rebar logged its worst weekly performance since late December in the last week of May, while other steel-making raw materials dipped alongside. 

China's copper imports, a widely-used building material and a key gauge of economic demand, sank 10.9% in May from the previous month, reversing the gain seen in April.

The consumer price index (CPI) in May rose 2.7 % from a year earlier, in line with expectations but the fastest rise since February 2018, driven by elevated pork prices as hog supplies continued their decline after the African swine fever outbreak across the country.

The food price index in May jumped 7.7% year-on-year, the fastest pace since January 2010 and higher than April's reading of 6.1%.

Fresh fruit prices soared 26.7% in May from a year earlier, after bad weather hit major producing regions, while the escalating China-U.S. trade war made it difficult for fruit traders to find alternatives to fill the shortage.

On a month-on-month basis, the CPI remain unchanged from a month earlier, compared with a 0.1% gain in April.

(Reporting by Hong Kong newsroom; Editing by Sam Holmes) ((hongkong.newsroom@thomsonreuters.com; (8610)6627-1277; Reuters Messaging: roxanne.liu@thomsonreuters.com))