A military court in Nigeria has sentenced a general to six months in jail for his involvement in one of the army's worst defeats by Boko Haram.
Gen Enitan Ransome-Kuti was convicted of failing in his duties when Islamist militants attacked the north-eastern town of Baga in January.
Scores of civilians were killed when Boko Haram overran the town and seized large quantities of weapons.
The general's lawyer told the BBC that he will appeal against the decision.
A separate accusation of cowardice was dropped.
The general comes from a celebrated Nigerian family. His uncle was the late Afrobreat legend Fela Kuti.
The exact number of those killed in the Baga attack remains unknown, but claims vary from the government's official figure of 150 to up to 2,000 reported by locals.
Gen Ransome-Kuti was also dismissed from the Nigerian armed forces as part of the court martial.
He was found guilty for "loss of equipment" in the attack on the headquarters of Nigeria's regional task force against Boko Haram.
"Boko Haram outnumbered his men. They had more superior weapons than the unserviceable equipment of the Nigerian Army," his lawyer Femi Falana told AFP news agency.
According to Nigerian media, among the military hardware lost in the attack were several armoured personnel carriers, 12 Toyota pick-up trucks, three rocket-propelled grenade launchers, more than a dozen machine guns, and a large quantity of ammunition.
Analysis: Jimmy Saleh, BBC Hausa Service
The military court in the capital Abuja said Brigadier Gen Ransome-Kuti was right to have asked his troops to retreat in the face of overwhelming firepower, but he should have called for reinforcements and launched a counter-attack to reclaim the town.
Hundreds of people were massacred by Boko Haram in Baga in January 2015 when Gen Ransome-Kuti and his men ran away from the town.
This was one of the biggest defeats suffered by the Nigerian army at the hands of Boko Haram, given the number of people killed and the high-calibre weapons gained by the insurgents.
The militants also detained many women in Baga whom they used as sex slaves.
The army's reputation has been affected by a series of mutinies by troops who on several occasions abandoned their weapons and fled the insurgents.
Today's sentence is intended to help restore discipline, which many think has been lacking within the ranks of the troops.
Some of the troops complained they were not being given the equipment needed to fight Boko Haram but more weapons have now been supplied.
According to Amnesty International, at least 17,000 people, mostly civilians, have been killed since 2009, when Boko Haram launched its violent uprising to try to impose militant Islamist rule.
With the help of regional armies, the Nigerian military has this year retaken most areas Boko Haram had captured.