IF THE gravity of a conflict can be measured by the length of the guns employed, it is worth noting that soldiers at checkpoints in Nigeria’s north have started fixing bayonets to their barrels. More than 1,000 people have died in terror attacks there this year, an increase of more than 50% on 2011. In response the government has deployed a heavily armed security force on the streets of Africa’s most populous nation to fight the perpetrators, a Muslim extremist group called Boko Haram (“Western education is sacrilegious”). It strives, among other things, for better governance and strict adherence to Islam.

The conflict (see article) has the potential to engulf the entire country. Nigeria’s population of 160m people is evenly divided between Muslims and Christians, and many of them get along. But relations have worsened in recent years, partly because of land disputes. Clashes are increasingly common and religious ghettoes are forming in mixed cities. Boko Haram has attacked churches. Some politicians talk openly of a possible division of the country—an exceedingly dangerous prospect. When Nigeria’s territorial integrity was last in question, during the Biafran war four decades ago, 1m people died.

The insurgency is doing great economic damage, too. Foreign and domestic investors have fled. The GDP of northern Nigeria is reckoned to have shrunk by around 30% since 2010. Public services have ceased in some places because frightened civil servants no longer turn up for work. The gap between the already poor north and the wealthy south is widening fast.

The conflict may be spreading. About 300 Boko Haram fighters have been spotted in Mali, with Islamic extremists who earlier this year captured the north-east of the country. Boko Haram has links to various groups affiliated to al-Qaeda. Last year it blew up the UN head office in Nigeria. Several insurgencies in north-west Africa could fuse to create a vast ungoverned space including Niger, Chad and southern Libya—to function as a haven for militants preparing attacks.

The Nigerian government’s response is not helping. That is partly because of corruption. A quarter of the national budget is spent on security. Some of that money goes on the purchase of sophisticated weapons whose purpose is more to line the pockets of corrupt officials than to defeat insurgents. The government is also heavy-handed. More Nigerians are killed by the police every year than by Boko Haram. Paramilitary forces, known as “go and kill” units, undermine popular support for the government in the north. The rounding up and imprisonment of the wives and children of Boko Haram leaders has only increased sympathy for the group.

Spread the wealth northwards

To believe, as many southerners do, that Boko Haram is run by nihilists or acts as a vehicle for the president’s enemies is to misunderstand the problem. The insurgency cannot be crushed by purely military means, for it is born of the poor north’s understandable resentment of the wealthy south. The fact that the north-east, where Boko Haram originates, has among the worst health and education in the world is a disgrace in a country which produces about as much oil as Iran.

Improving economic and social conditions in the area will be difficult while people are not safe. So the government needs both to hunt down the group’s most extreme leaders and ensure that the security services take more trouble not to kill civilians in their effort. At the same time, it needs to make a serious effort not just to offer emergency aid in areas of great hardship, but also to extend the provision of health care, education, transport infrastructure and electricity. Releasing those wives and children would also be a good idea, for the government will have to negotiate with the movement’s more flexible leaders. Bigger guns will not blow Boko Haram away.