Pic: AP.

BEIJING (AP) — China’s consumer inflation edged up in March as food prices rose despite signs the world’s second-largest economy is slowing.

Government data Friday showed consumer prices rose 2.4 percent, up from February’s 2 percent. The increase was driven by a 4.1 percent rise in politically sensitive food costs.

Producer prices, measured as goods leave the factory, fell by 2.3 percent in a sign of weakening economic growth. It was their 25th straight month of decline.

Consumer inflation still is well below the official target for the year of 3.5 percent, leaving Beijing room to stimulate the slowing economy with interest rate cuts or other measures if necessary.

Trade data this week showed China’s imports shrank 11.3 percent in March in a sign of weak domestic demand.