China's consumer inflation rose at a slower pace in July due to weaker gasoline price gains, while factory-gate inflation remained elevated despite edging down from a recent peak amid softer global commodity prices and seasonal factors, the National Bureau of Statistics said on Sunday.

The country's consumer price index, a main gauge of inflation, registered a 0.5 percent year-on-year increase in July, moderating from 1.0 percent in June and marking its slowest rise since January, NBS data showed.

The cooling in year-on-year CPI growth, according to Dong Lijuan, a statistician with the bureau, stemmed largely from a sharp slowdown in gasoline price gains.

"Gasoline prices were 1.0 percent higher than a year earlier, compared with a 17.0 percent increase in June," Dong said.

"This reduced their upward contribution to the overall CPI increase by about 0.45 percentage points and helped bring energy price growth down to 0.6 percent."