An increasingly violent insurgency by Islamist sect Boko Haram in Nigeria's economically stagnant north has begun pressuring the country's finances by forcing extra spending on security.
It is diverting money away from needed infrastructure spending and could be costing as much as 2 percent of the country's economic output.
In seeking to have Islamic sharia law more widely applied across Africa's most populous nation, Boko Haram has been waging a low-level insurgency against the government and security forces since 2009.
The severity of its attacks has leapt in the last six months, with its strikes largely confined to the Muslim north, a long distance from the commercial hubs of Lagos and the Niger Delta, home to Africa's biggest oil industry.
This means that foreign investors have not been unduly rattled in a broad sense.
The northeast is not all that important economically, so unless they start blowing up stuff in Lagos or they can find a way to disrupt business on a larger scale, I think foreign investors are prepared to live with the threat, said Alan Cameron, analyst at London-based Investment firm CSL.
However, foreign direct investors and portfolio managers are concerned about the progress of structural reforms in one of the continent's most inefficient and wasteful economies -- and about the government's ability to keep a lid on spending.
On that latter point, the Boko Haram insurgency is having a bigger impact.
Nigeria's security bill has risen to 20 percent of spending in the 2012 budget from 16 percent in 2010, leaving less money for much-needed infrastructure projects and for work on reforms to the power and other social and industrial sectors.
The 2011 budget did not give a breakdown for security costs.
It implies less spending on power infrastructure, education and health care, which combined have been allocated a smaller budget than security in 2012, Renaissance Capital economist Yvonne Mhango said in a note.
The direct cost of security is at least 2 percent of Nigeria's $250 billion economy, measured by the share of spending-to-gross domestic product in 2012, Mhango said.
High government spending is also putting pressure on the naira currency. Central bank governor Lamido Sanusi was forced into a controlled depreciation of the naira last year and although it has stabilized, trading is volatile.
Sanusi has urged the government to control public spending to prevent further weakening, which would bite directly into potential investment returns for foreigners.
Boko Haram killed more than 250 people in a series of attacks in January, according to Human Rights Watch, and security experts believe it has growing ties with outside Islamist groups, including al-Qaida's North African wing.
It has become Nigerian President Goodluck Jonathan's biggest headache, and it is threatening to divert the government's attention from the pressing but thorny issue of weaning the economy away from its reliance on crude oil exports.
You can draw parallels with Japan, which experienced a nuclear crisis last year. The government was distracted by the disaster to the detriment of the economy, one European investor in Africa told Reuters.
If the Nigerian government gets distracted by Boko Haram rather than economic growth, then it could start to witness weakening economic fundamentals, he said.