China's inflation cooled in May, giving Beijing more wiggle room to loosen policy and stimulate growth.

The world's second-largest economy reported its consumer price index rose 3 percent in May from a year earlier -- the slowest pace in two years. That was down from April's 3.4 percent increase and lower than economists' forecast of a 3.2 percent rise. Food prices were up 6.4 percent from the year-ago period, following a 7 percent increase in April.

Meanwhile, the country's producer price index, the main gauge of inflation at the wholesale level, fell by 1.4 percent in May from a year earlier, compared with a 0.7 percent dip in April and economists' expectations for a 1.1 percent decline.