By James Copnall
Three years ago the military deposed the president of Mauritania, Maaouiya Ould Taya, in a peaceful coup d'etat, an event with both parallels and major differences to the latest undemocratic change of power in the country.
Mr Abdallahi was elected last year in Mauritania's first-ever free elections
In 2005 a trickle of limp condemnations from around the world accurately indicated the extent of frustration with the autocratic regime of Mr Ould Taya, who had been in power for more than 20 years.
The high-ranking officers who led the coup formed a ruling committee and promised to return the country to civilian rule within two years.
They kept their promise and became known in some quarters as the good soldiers.
Now the scenario seems to be repeating itself - but perhaps with some key differences.
Gen Mohamed Ould Abdelaziz was number two in the military junta that seized power in 2005, then became the head of the presidential guard in the new administration.
He now presides over the state council, the new body set up by the soldiers who overthrew President Ould Cheikh Abdallahi on Wednesday morning.
Here lies the first, substantial difference.
Unlike Mr Ould Taya, who himself seized power in a coup, Mr Abdallahi was elected in polls widely considered free and fair - the first in Mauritanian history.
This time Gen Abdelaziz and his fellow soldiers have not overthrown a man widely seen as a dictator, but a democratically elected leader in whom Mauritanians and the international community had put huge amounts of faith.
So why did the general choose to act?
The spark was undoubtedly the presidential decree Mr Abdallahi signed on Wednesday morning announcing Gen Abdelaziz's sacking, along with several other high-ranking officers.
But that was merely the latest step in a struggle for power at the top of the Mauritanian state.
President Abdallahi dissolved two governments in the past few months and on Monday 48 MPs from the governing party, PNDD-ADIL, resigned in protest.
"It was an open secret that senior military figures were unhappy with Abdallahi's attempts to increase his political power, by establishing the PNDD, replacing the previous technocratic cabinet with one closer to him and including Taya regime figures," says Ruairi Patterson, a Middle East and North Africa analyst at Control Risks.
"They had also lost confidence in his ability to tackle Mauritania's numerous socioeconomic problems [terrorism, food crisis etc].
"Everyone knew that they were behind the rebels in the PNDD-ADIL."
From this viewpoint, Mr Abdallahi fatally misjudged his own diminishing power when he signed the decree removing the military men he believed were plotting against him.
The intentions of the newly set-up state council are as yet unclear.
But already a second major difference with the events of three years ago can be stated.
It will be difficult to believe Gen Abdelaziz and his men if they say once more they are keeping out of politics.
Significantly, perhaps, the condemnations from abroad have been sterner this time round - the EU has already hinted it may withdraw aid.
The international community has invested heavily in the vision of a newly democratic Mauritania, which could serve as a model for much of the Arabic world, and this latest coup will depress many.
So where does this leave Mauritania?
Ruairi Patterson believes Gen Abdelaziz is unlikely to disappear from the scene for some time.
"I imagine they'll hand back power to civilians eventually and may well hold more elections, but will make it clear that they intend to have some sort of tutelary role for the foreseeable future," he told the BBC.
But whatever does happen, it seems the myth of the good soldiers who believe in democracy has been shattered forever.