The figure released on Thursday was in line with that forecast by a Reuters poll of analysts last week.
Food inflation edged higher to an annual 10.0 percent in June, up 0.2 percentage points from May, as disruptions to fuel distribution affected food prices.
“(The) irregularity of the supply of Premium Motor Spirit (gasoline) continues to impact food prices,” the National Bureau of Statistics (NBS) said.
It added that a delayed rainy season and resulting late harvest has also been putting upward pressure on prices.
Major cities in Africa’s biggest economy suffered acute fuel shortages in May arising from disputes over subsidy payments.
Worries that the new government elected in March would not honour previous subsidy debts prompted some importers to stop fuel imports and distribution. The shortages disrupted key services including telecommunications, banking and aviation.
The government last week agreed to pay the outstanding subsidy-related debt. Africa’s biggest oil producer relies almost wholly on imports for its 40 million litres a day petrol consumption owing to a neglected refining system.
The NBS in March said it expected inflation to inch up to around 9 percent this year, from its January forecast of 8.78 for 2015, following a currency devaluation meant to counter the impact of lower revenues from crude oil, Nigeria’s main export.