Tanzania's year-on-year inflation slowed to 5.2 percent in July from 5.4 percent a month earlier.

The slowdown was "largely due to slower rises in food prices," said Ephraim Kwesigabo, a director at the state-run National Bureau of Statistics (NBS).

Food and non-alcoholic beverages prices grew at a rate of 8.9 percent year-on-year in July, down from 9.6 percent in June, he said.

Cereals, fish, beans and vegetables were among the food items whose prices declined, according to Kwesigabo.

At 38 percent, food has the largest weight in Tanzania's inflation basket and tends to be the main factor behind any changes to inflation rates.

Month-on-month inflation declined by 0.2 percent in July from a 0.1 percent drop in June.