NEW YORK — There was a time not so long ago when a mutiny by Nigerian soldiers invariably led to bloodshed, arrests and a new government in Lagos.

On Wednesday, when army troops launched an unsuccessful attempt to assassinate one of their country’s most prominent generals, it sent a shiver down older spines.

The attempt was unsuccessful and appears to be no threat to the country’s government. But like the current standoff with Boko Haram, a militant group that kidnapped more than 200 girls last month from a remote village school, the botched assassination is shining an unwelcome spotlight on a flailing military force.

On Friday, President Goodluck Jonathan abruptly canceled his planned visit to the area due to security concerns.

Nigeria’s army came by its reputation for brutality honestly. The military ruled Nigeria as a dictatorship for most of the period between independence from Britain in 1960 and 1998, when the last of its venal strongmen, Sani Abacha, died under mysterious circumstances. The generals, tainted by repression, a brutal civil war in the 1960s and a world-beating reputation for corruption, retreated to the barracks. Then they remade themselves as important contributors of troops to United Nations and regional peacekeeping missions.

The remains of Gamboru market, attacked by suspected Islamist insurgents in northeastern Nigeria on May 11.

But Boko Haram’s violence and kidnappings are putting the military back in the headlines. The army’s inability to counter the group has forced the national government to do something unprecedented: invite the United States, French and British militaries to help them rescue the young hostages.

Wednesday’s assassination attempt, in fact, occurred at the headquarters of the very division charged with finding the girls. Nigeria’s 7 Division is based in Maiduguri, the capital of Borno state, amid Boko Haram’s stronghold in the northwest of the country and the same region where the schoolgirls were abducted on April 14.

Nigerian press reports say that 7 Division soldiers fired on the vehicle of their commander, Maj. Gen. Ahmadu Mohammed, as he addressed troops at the Maimalari Barracks. Mohammed’s division is on the front lines of the fight against Boko Haram, and its troops have suffered heavy casualties — and, according to human rights groups, retaliated against civilians in the region.

Military officials in Nigeria’s capital have denied the incident, claiming that 7 Division soldiers merely fired in the air to commemorate four comrades who had been killed in a bloody skirmish with Boko Haram.

But Nigerian media report soldiers fired on the general’s vehicle as the bodies of slain comrades were being brought to the base morgue. Nigeria’s military has opened an investigation.

Few see the incident in Borno as a threat to Nigerian democracy, but it has highlighted the low morale and poor capabilities of the 60,000-strong army. Nigeria’s military, with a budget of over $6 billion a year, simply is not an effective force. And as the events in Borno state indicate, it lacks the discipline of a professional military, too.

"We’re now looking at a military force that’s, quite frankly, becoming afraid to even engage,” Alice Friend, the Pentagon’s principal director for African affairs, said in congressional testimony Thursday.

“The Nigerian military has the same challenges with corruption that every other institution in Nigeria does. Much of the funding that goes to the Nigerian military is skimmed off the top, if you will.”

This is not all the government’s fault. While Nigeria’s economy is growing fast, and it overtook South Africa’s to become sub-Saharan Africa’s largest last year, oil revenues have dropped due to flagging global prices and corruption remains a huge problem.

Nigeria is under pressure — like all countries hoping to raise money in international bond markets — to control public spending. Its growing population needs jobs, its increasingly vocal middle class demands services, and the government’s inability to fund these changes through oil exports is exacerbating long-standing religious and ethnic tensions.

Yet, far from splurging on new military capabilities, the government in 2012 and 2013 actually cut defense spending. That’s one of the few ways to balance a budget without touching popular social programs like food and fuel subsidies.

Military expenditures fell in 2013 by over 5 percent, according to the Stockholm International Peace Research Institute (SIPRI).

That said, cutting defense in Nigeria does not have the same effect that it does in the US or Europe, where capabilities are immediately affected. Nigeria’s defense budget is almost entirely consumed by a mixture of payroll, basic supplies and graft.

Purchases of new weapons systems are rare, with new equipment often amounting to refurbished platforms that spent their most useful years in Western forces. The former US Coast Guard cutter pensioned off cheaply to the Nigerian Navy in 2012. The ship, the former USCG Gallatin, first sailed in 1967.

On paper, Nigeria has almost 95 aircraft and 75 warships, for instance. In reality, fewer than one-third of these aircraft have flown in recent years — most have been cannibalized for spare parts. Its warships include a host of small coastal patrol craft — in effect, motorboats.

But the most serious problem may not be equipment but doctrine. Great “kit” isn’t much help fighting a violent guerrilla insurgency, a fact the US military discovered in Iraq and still struggles with in Afghanistan.

To the extent that US and European forces can bring lessons learned in those wars to Nigeria’s hinterland, they may be of some help. But even the most adaptable militaries take years to make such adjustments.

For the more than 200 schoolgirls in Boko Haram’s clutches, that’s simply too long to wait.