Twelve Nigerian soldiers have been sentenced to death for mutiny and attempted murder after shots were fired at their commanding officer in the north-eastern city of Maiduguri in May.
The soldiers were angry after a convoy was ambushed on a road frequently targeted by Islamist Boko Haram militants.
Five other soldiers were acquitted and one was convicted on another count.
All denied the charges at a court martial in Abuja.
The nine-member military tribunal heard that the incident happened when shots were fired at the commanding officer of the Nigerian Army’s Seventh Division, which is at the forefront of the fight against Boko Haram.
Witnesses said the soldiers lost discipline and threw stones at the officer when he arrived at their camp, and shots were fired into the air.
General Amadu Mohammed had to take cover as they aimed their guns at him – firing bullet-holes in his armour-plated staff car – but he was not injured.
Court President Chukwuemeka Okonkwo said that while the sentences were subject to confirmation by Nigeria’s military authorities, there was no doubt about the seriousness of the offence.
The sentencing panel took into account the “likely effect on counter-insurgency operations” of the incident as well as its “implications on national security”.
Nigeria’s army has been under pressure to end the bloody five-year insurgency.
Boko Haram is fighting to create an Islamic state in Nigeria – and has stepped up its attacks after being pushed out of its bases in Maiduguri, the capital of Borno state, targeting towns and villages in deadly raids.
The fighting has claimed thousands of lives, made tens of thousands of people homeless and seen the militants make recent territorial gains in the north-east.
Last month a group of soldiers in the north-east refused to fight Boko Haram until they received better equipment, one of them told the BBC.
Frontline troops often complain that they lack adequate weapons and equipment while there have also been reports that they have not been paid or properly fed.