Mali's reputation as a beacon of democracy and stability in west Africa was extinguished late on Wednesday night, when a group of young army officers stormed the presidential palace in the capital Bamako and announced that they were suspending the constitution and taking power. On Thursday morning, the leader of the putsch, Captain Amadou Haya Sanogo, went on state TV to declare a curfew and call a halt to widespread looting, in a voice so hoarse as to be almost inaudible.

This military coup was born out of the deep anger at the way in which the ousted president, Amadou Toumani Touré, had been conducting the war against a Tuareg-led insurgency in the north of the country. Stories of soldiers being sent to the front without the necessary weaponry and almost starving to death out in the vastness of the Sahara, a place as alien and distant to them as Siberia is to a Muscovite, had turned public opinion against him.

Popular anger was exacerbated by a series of ignominious defeats in recent weeks, especially the loss of a crucial strategic base near the desert town of Tessalit that gave the insurgents complete control of most of the north of the country, bar the major towns of Timbuktu, Gao and Kidal. These feelings of shame and anger were especially acute among the military families living near the main army barracks in Kati near Bamako, where the mutiny began.

Nonetheless most Malians are baffled by the decision of Sanogo and his men to seize power only weeks before presidential elections at which Touré, who was coming to the end of his second term in office, had promised to step down. This abortion of the democratic process will rob the Malian government of its democratic legitimacy and hence the support of many influential international partners, including the US, France, the EU and the African Union.

The international community had long been prepared to back the Touré regime despite the numerous accusations of corruption, involvement in cocaine smuggling and lack of resolve in its fight against Islamic terrorism that had dogged it in the last few years, simply because Mali was seen as one of those rare African democracies that seemed to function more or less "properly". Bamako was seen as a safe city where culture and tourism flourished. That glow of legitimacy and welcome has disappeared overnight.

Most Malians are also wondering who this hitherto unknown Sanogo really is and who's backing him. The cynical view has long been that France retains ultimate control over the political life of its former colonies in sub-Saharan Africa thanks to the close ties between the French army and the military establishments of countries like Mali, Niger and Senegal. However, since Sanogo and his co-conspirators come from such lowly rungs of the Malian military ladder, it's very possible that France had no prior knowledge of this coup and that it should be taken at face value as a spontaneous act born out of unbearable anger and frustration.

Meanwhile the Tuareg rebels in the National Movement for the Liberation of the Azawad (NMLA) are preparing for their "final push" on the last bastions of Malian power in the northern deserts. Only hours after the military coup on Thursday morning, an NMLA spokesperson declared that it intended to exploit the confusion in Bamako by launching new attacks and grabbing more territory.

If the NMLA succeeds in its declared aim of winning independence, Mali faces the prospect of losing over half its territory along with the immense oil and mineral wealth that lie under the desert sands. Sanogo and his demoralised fellow soldiers have plunged a once proud African democracy back into the darkness of military dictatorship in order to try and avoid that nightmare scenario. It's a gamble of historic proportions.