The regional organisation, the Economic Community of West African States (Ecowas), took a softer line, putting together a mediation team and offering the coup leaders amnesty despite the killings. But when civil society groups in Burkina Faso protested at the amnesty offer, the Nigerian president, Muhammadu Buhari, took the lead for West Africa.
Buhari, who was a military dictator 30 years ago, coming to power in one coup and losing it in another, now describes himself as a "converted democrat". He called Diendere's coup a "brazen contravention" of Burkina Faso's constitution and demanded that he withdraw. And Burkina Faso's army, which had always resented the special privileges of the Presidential Guard, moved into the capital and told Diendere to surrender.
So he did, although there was a bit of shooting first. Now Diendere is under arrest facing 11 charges including "crimes against humanity", the Presidential Guard has been disarmed and formally disbanded, and the election is back on again for 29 November.
The election will not solve all of Burkina Faso's problems, but democracy might do it eventually. The country still has the lowest literacy rate in the world, it is still dirt poor, and the population (now 17 million) is still doubling every 25 years. But one thing is definitely changed for the better.
Most Burkinabes may be illiterate, but they have become aware of their rights and no longer accept the dictates of armed thugs in uniform without question. African institutions have changed, too, and no longer turn a blind eye when a member country faces a military coup.
They intervene promptly and decisively, and they generally succeed.
The real value of democracy is that it requires the rule of law, which is the most important thing you need in order for economic growth to benefit people outside the political and business elite. People just won't bother to invest and work hard if they know the proceeds are likely to be stolen.
The rule of law is never complete - even in the most developed countries, there is often one law for the rich and another for the poor - but the closer you get to the ideal the better your growth will be. People often miss this, thinking only in terms of human rights, and arguing that the economy, not democracy, must be the first priority for poor countries.
They are wrong. It is the rule of law that gradually shrinks corruption and gives people a reason to invest in their future, and you can't have the rule of law without democracy. Burkina Faso is heading in the right direction, and so is Africa.
-Gwynne Dyer is an independent journalist whose articles are published in 45 countries.