Residents shopping in a supermarket on August 9, 2013 in Lianyungang, Jiangsu Province of China.

China's March consumer inflation rose to a five-month high due to rising food prices, data from the country's National Bureau of Statistics released Thursday showed.

Consumer price index (CPI) in March rose 2.3 percent from a year ago — the quickest pace since October 2018. It was lower than the 2.4 percent rise forecast by economists Reuters polled, but higher than February's 1.5 percent increase.

Food CPI was up 4.1 percent on year in March, up sharply from a 0.7 percent on-year rise in February due to a seasonal rise in vegetable prices and an on-year rise in pork prices, said the statistics bureau. Farmers in China have been culling their hogs in a bid to stem the spread of African swine fever, driving up pork prices.

Non-food CPI was 1.8 percent, little changed from February's 1.7 percent rise on-year.

Producer price inflation (PPI) picked up for the first time in nine months, easing deflation fears amid China's bilateral trade war with the U.S.

China's PPI — a gauge of industrial profitability — rose 0.4 percent from a year ago in March. It came in line with expectations of analysts polled by Reuters. February PPI was up 0.1 percent on-year.

"I don't think inflation is the focus right now of the central bank in China. They've got huge capacity; in fact, they've got overcapacity in most sectors," said Andrew Collier, managing director of Hong Kong-based Orient Capital Research, citing the global economic climate and domestic liquidity concerns as Beijing's key issues.

Even though food inflation was higher, price increases were still mostly in control, Collier told CNBC's "Street Signs on Thursday.

However, Nomura said the People's Bank of China may ease monetary policy to reach the government's 3.0 percent inflation target in 2019.

"The acceleration of CPI inflation comes mainly from pork prices rather than a general rise in prices and, unless inflationary pressures spread to other areas, the central bank will more likely look through the cyclical acceleration in pork prices and continue to support the economic growth via its monetary policy easing bias through the rest of this year," the Nomura economists wrote in a note on Thursday.

The world's second-largest economy is being closely watched for signs of damage stemming from the trade war between Washington and Beijing.

Treasury Secretary Steven Mnuchin said that the U.S. and China are making progress on a trade deal — including a mechanism for enforcing the terms of any agreement.

Mnuchin made those comments to Sara Eisen on CNBC's The Exchange on Wednesday, though he did not elaborate on what an enforcement mechanism would look like.

— Reuters contributed to this report.