A Nigerian Military Court Marshall has sentenced 12 soldiers to death by firing squad 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.

Front-line 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.

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".