More than 80 people stood trial, along with the generals, for the 2015 short-lived coup. Diendere briefly took power after the presidential guard under his command staged a coup of the transitional government in September 2015. He stepped down days later under pressure from the regional bloc, Burkina Faso's military and protesting citizens. He and others now face life in prison for charges including conspiracy against the state, murder and beatings.
Bassole, a former foreign affairs minister, is accused of treason. Many of the others accused are former soldiers in the presidential guard. Civil society organizations have called the trial a victory against anti-democratic forces.
The transition government was set up after President Blaise Compaore's ouster in a public uprising in 2014, ending nearly 30 years in power. A year later, as Burkina Faso prepared to transfer power to an elected head of state, the former presidential guards arrested transitional President Michel Kafando and several other officials, unhappy that Compaore supporters couldn't run in the election.
The unrest that quickly forced the coup leaders to surrender killed at least 15 people and wounded more than 200 others. Many in Burkina Faso had earlier questioned the military tribunal's ability to deliver a fair trial since its members are appointed by the ministry of defense and head of state. The military courts are outside the control of the body responsible for overseeing the independence of the judiciary.
"I think we didn't need to waste that much time and money on this trial, but hey it's done we hope that the convicts will learn the necessary lessons," said Amado Ouedraogo who came to see the end of the trial.
Pascal Ilboudo said the punishments were insufficient, but said the condemned would at least be able to "meditate on the meaning of life in society in their jails." He said he hopes they are not released early.
Louis Yaogo said all the defendants deserve respect and dignity, but must take responsibility. "Those who considered the generals so untouchable that they felt that no one could judge them should shut up," he said. "The verdict clearly indicates that this trial is far from a witch hunt." He said now the country must deal with insecurity.
AP writer Carley Petesch in Dakar, Senegal contributed to this report.