BEIJING--China's consumer inflation picked up speed for a second straight month in October, boosted by accelerating food prices, but it remained below a government upper limit, official data showed Wednesday.

China's consumer price index increased 2.1% in October from a year earlier, rising at a quicker pace than a 1.9% year-over-year gain in September, the National Bureau of Statistics said, adding that rising food prices were the main factor pushing up on the headline figure.

The key inflation reading matched a median 2.1% gain forecast by 14 economists surveyed by The Wall Street Journal.

The result was below Beijing's targeted maximum of 3% inflation this year, giving room for Beijing to loosen monetary policy if it wants to further stabilize economic growth.

On a month-over-month basis, the CPI edged down 0.1% in October from a month earlier. In September, it climbed 0.7% from the previous month.

China's producer price index rose 1.2% in October from a year earlier, compared with a 0.1% year-over-year increase in September. The index had lingered in deflationary territory for more than four years before September's uptick.

The rise in the gauge of factory-gate prices came in faster than economists' median forecast of a 0.9% increase.

PPI rose 0.7% in October from September, compared with month-over-month growth of 0.5% in September.

--Liyan Qi

Write to Liyan Qi at liyan.qi@wsj.com

(END) Dow Jones Newswires

November 08, 2016 21:02 ET (02:02 GMT)

Copyright (c) 2016 Dow Jones & Company, Inc.