So much for what we had grown used to thinking of, half-jokingly, as the Arab world's only democracy. Three years and three days after the coup that deposed a much-hated and brutal dictator, Mauritania's generals decided they would get rid of President Sidi Mohammed Ould Cheikh Abdellahi, an ineffectual politician and undoubtedly bad leader who nonetheless had the merit of having been fairly elected.

For the past six weeks, Mauritanian politics (which you will only hear about in the Western press when there's been a coup, which may be why they have them so often -- 10 in the last 50 years) had come to a standstill as MPs from the ruling party rebelled, governments fell or resigned, motions of no-confidence were threatened, and financial improprieties by the first lady were investigated. Outlandish claims of corruption were made (one I saw reported is that Abdellahi spent $2 billion on his family's travels, a figure which even the notoriously profligate King of Morocco doesn't reach), and more generally many Mauritanians appeared to be unhappy with problems such as rising jihadist violence that caused the cancellation of the Paris-Dakar earlier this year, poor handling of rocketing food prices (Mauritania regularly suffers from droughts and imports 70% of its food), and other ills. Dissident MPs were reportedly courting the military about doing something about all this, which did not please Abdellahi, who responded by firing the top four generals in the army.

It so happened that there were the same people who had carried out the 2005 coup -- and indeed charged with protecting the president and the constitution -- so they were not about to let that happen. They arrested him and his prime minister, and repeated the same scenario as three years ago: formed a temporary "state council" to govern the country while they promised free and fair elections and the eventual restoration of normal constitutional rule.

Except that this time it is a lot less easy to accept the military coup as a form of positive intervention. Even if Abdellahi was corrupt and ineffectual, so much symbolic capital has been spent on legitimizing the previous coup as democratic that justifying this one will be difficult. The suspension of foreign aid by the US, and probably soon the EU, are one sign that things are different. One thing that is important to remember is that the people behind the coup are not only the same ones as in 2005, but that they were also part of the ruling elite under the previous president, Ould Taya. One might even say that they are the same people who've been ruling for decades, more or less. It now seems that the legitimacy the 2005 coup has gone to their heads, and that they think they can intervene every time there's been a hiccup. So even while Mauritania was given an unlikely veneer of democracy, the army remained capable and willing to intervene at any point rather than let politicians (no matter how inadequately) resolve their problems among themselves. Abdellahi could have been ousted by constitutional means, and chances are that if he had not taken the ill-considered move of sacking the military's top brass (presumably to replace them with allies) he would have lost his post one way or another.

In the meantime, should they want to become more robustly democratic, Mauritanians need a military with less itchy trigger-fingers, new mechanisms to defuse political crises (and, realistically, prevent politicians from too arbitrarily interfering in military affairs). But it would also help if Mauritania's neighbors (who have been very silent on all this), its distant backers like Saudi Arabia, France or the US, and the international community more generally were to coax the military junta into a deal whereby Abdellahi is restored to power in return for the cancellation of his order sacking the generals. Then, Mauritania's politicians can decide for themselves whether they should relieve Abdellahi or call for fresh presidential elections.

For the rest of the Arab world, there is the usual perplexing scene of illegitimately elected autocrats and monarchs-for-life voicing their concerns for democracy. Perhaps they are secretly rejoicing that dirt-poor, peripheral Mauritania has not turned out to be as democratic as everyone thought and that the sarcastic columns penned by the likes of Fahmy Howeidy, who in 2005 wondered whether "the Mauritanian option" was the solution to the Arab political predicament, will no longer appear.

Above: Al Jazeera International reporting on anti- and pro- coup demos in Nouakshott.

Issandr El Amrani is a Cairo-based writer and consultant. His reporting and commentary on the Middle East and North Africa has appeared in The Economist, London Review of Books, Financial Times, The National, The Guardian, Time and other publications. He also publishes one of the longest-running blog in the region, www.arabist.net.