Nigeria's headline inflation unexpectedly fell in July, data showed, reaching its lowest level for more than three years following an aggressive period of monetary tightening by the central bank.

Gains in consumer prices eased to 9.4 percent year-on-year from 10.2 percent in June, the National Bureau of Statistics said on Tuesday.

Food prices, the biggest contributor to the price index in Africa's most populous nation, gained 7.9 percent compared with 9.2 percent the previous month.

The drop in inflation took many analysts by surprise. A Reuters poll last week forecast a figure of 10.7 percent.

Nigeria's central bank has been tightening policy for months in an effort to get inflation into single digits, lifting its benchmark interest rate to 8.75 percent last month in the fourth hike this year.

While the drop in inflation below its notional target will please the central bank, it will be wary of core inflation that remained at 11.5 percent.

Core inflation excludes some volatile components such as food and energy. The drop in food inflation, which is seasonal, will have contributed heavily to the fall in the headline figure.

The central bank has been balancing the need to curb inflation while promoting growth in sub-Saharan Africa's second-largest economy and reducing high unemployment.

Bank governor Lamido Sanusi has expressed concerns about the global economic downturn and the likely impact on demand for Nigeria's crude oil, its main source of foreign currency.

"Looking forward, we expect CPI inflation to remain around current levels over the coming months, which we believe will provide some level of comfort to the (bank's) Monetary Policy Committee," said Andrea Masia, research analyst at Morgan Stanley.

The headline inflation figure was the lowest since a reading of 8.2 percent in April 2008.

Increased liquidity is expected to have an impact on future inflation after a record 1 trillion naira was distributed from federal accounts to the three tiers of government for June.

The surprise decision to nationalise three banks this month, prompted state asset management company AMCON to inject 679 billion naira into the three banks on Monday, adding to liquidity flows.