Nigeria's economy expanded in the second quarter, ending its worst slump in 25 years as agricultural and oil output increased.

Gross domestic product of Africa's largest crude producer grew 0.55 per cent in the three months through June from a year earlier, compared with a revised 0.9-per-cent contraction in the first quarter, the Abuja-based National Bureau of Statistics said in an e-mailed report on Tuesday. The median of 10 economists' estimates in a Bloomberg survey was for growth of 1.3 per cent.

This ends five straight quarters of contractions that also saw the economy decline 1.6 per cent last year, the first such drop since 1991. The International Monetary Fund forecasts growth of 0.8 per cent this year as output of oil climbs and supply of foreign currency, needed by manufacturers to import inputs, continues to improve.

Story continues below advertisement

"While many will focus on the headline move back into positive territory, some of that optimism must necessarily be tempered," Razia Khan, the head of macroeconomic research at Standard Chartered Bank PLC in London, said by e-mail. "This is not at all a robust GDP print. It still falls far short of the growth rates the Nigerian economy should be achieving."

Agriculture, which vies with industries as the second-biggest contributor to GDP, expanded 3 per cent in the quarter from a year earlier, the statistics agency said. Services, the largest sector at 54 per cent, contracted 0.9 per cent. The oil industry climbed 1.6 per cent.

Nigerian authorities improved foreign-currency liquidity by introducing a trading window for portfolio investors at market-determined rates, and later by allowing commercial banks to quote the so-called Nafex rate that's now close to pricing on the black market. Before this, the central bank regularly intervened to keep the naira at about 315 per U.S. dollar, even after months of abandoning a 197-199 peg.

The naira weakened 0.9 per cent to 358.74 a dollar at 2:48 p.m. in Lagos, the commercial capital.

Story continues below advertisement

The central bank has kept its main lending rate at a record high of 14 per cent since July, 2016, to support the naira and to fight inflation that was at 16.1 per cent last month, still almost double the target.

Economists including Yvonne Mhango at Renaissance Capital see the central bank continuing a tight monetary-policy stance.

"While rate cuts may be positive for private credit extension, we think the subsequent loss of foreign-currency liquidity from lower rates may hurt the economic recovery," Ms. Mhango said by e-mail.

President Muhammadu Buhari, who returned to Nigeria Aug. 20 after more than three months of sick leave in London, increased spending to a record 7.4 trillion naira ($25.4-billion Canadian) this year.

Story continues below advertisement

The budget is part of a wider plan to increase the economic growth rate to 7 per cent and create 15 million jobs by 2020 by pumping more crude, opening farmlands and increasing infrastructure spending.