Islamic militants again attacked the remote Nigerian town from which nearly 300 schoolgirls were kidnapped, Nigeria’s military said Wednesday, resulting in a firefight that killed 12 soldiers and led angry troops to fire on a commanding officer.

Soldiers said the troops fired at a senior officer who came to pay respects to the killed soldiers, whose bodies were brought to a barracks in Maiduguri. The capital of northeastern Borno state is about 80 miles north of the town of Chibok, where the girls were abducted a month ago.

The incident is a sign of demoralization in the military that is in charge of the search operation for the abducted schoolgirls. The failure of Nigeria’s government and military to find them after the April 15 mass abduction has brought mounting national and international outrage and forced Nigeria’s government to accept international help.

Nigeria’s Ministry of Defense played down the incident, saying soldiers “registered their anger about the incident by firing into the air. The situation has since been brought under control, as there is calm in the cantonment …”

But soldiers who were at the scene at Mailamari Barracks said infuriated troopers fired directly at the vehicle carrying Maj. Gen. Ahmadu Mohammed, the general officer commanding the army’s 7 Division. He was not hit.

The witnesses said the soldiers were angry because they wanted to spend the night in a village and told their command the road was dangerous after the attack just outside Chibok. They were ordered to travel instead and were ambushed, with at least 12 killed. The soldiers spoke on condition of anonymity because they want to keep their jobs.

The Ministry of Defense said in a statement that four soldiers who were on patrol around Chibok were killed. The military often exaggerates the number of enemy killed and downplays its own death toll.

Vigilante groups have been springing up in northern Nigeria over the past year amid accusations the military is not acting fast enough against the Islamic extremists.

In Kalabalge, a village about 155 miles from Maiduguri, where the terrorist network Boko Haram was born, residents said they took matters into their own hands.

On Tuesday morning, after learning about an impending attack by the militants, villagers ambushed two trucks with gunmen, residents and a security official said. At least 10 militants were detained, and scores were killed, the official said, speaking on condition of anonymity because he is not authorized to give interviews to journalists. It was not immediately clear where the detainees were being held.

Kalabalge trader Ajid Musa said that after residents organized the vigilante group, “it is impossible” for militants to successfully stage attacks there.

“That is why most attacks by the Boko Haram on our village continued (to) fail because they cannot come in here and start shooting and killing people,” he said. Earlier this year in other parts of Borno, extremists launched more attacks in what some feared was retaliation over the vigilante groups.

Borno is one of three Nigerian states where President Goodluck Jonathan has imposed a state of emergency, giving the military special powers to fight the Islamic extremist group, whose stronghold is in northeast Nigeria.