Burundi court slams life terms on 21 'coup plotters'
The court had in January given 30-year jail terms to nine officers and sentenced eight other soldiers to five years while acquitting seven others.
But prosecutors appealed the initial sentence. The decision is however not binding as it can be appealed once more.
"Twenty-one officers including the main accused like General Cyrille Ndayirukiye were sentenced to life," a judicial source said, speaking in the central city of Gitega.
The source said two senior army officers initially acquitted were also given life terms.
Prosecutors had said in January that they wanted all jailed for life and the seven acquitted to face a re-trial.
Burundi has been in crisis since April 2015 when President Pierre Nkurunziza ran for a controversial third term, sparking street protests, the failed coup, regular killings and smouldering violence.
Hundreds have been killed and a quarter of a million people have fled Burundi since.