Four army officers convicted of masterminding a raft of coup plots against Mauritanian President Maaouya Ould Taya escaped the death sentence but were sentenced to life in prison as a two-month mass trial drew to a close on Thursday.
But the court cleared three leading opposition politicians of bankrolling the operations, including Mohamed Kouna Ould Haidallah, a former president and the main challenger to Ould Taya in the last presidential elections in 2003.
Mauritanian authorities had brought a total of 195 defendants to trial at a remote police barracks in the desert, some 50 km east of the capital, Nouakchott.
Most were accused of having a hand in a bloody uprising in June 2003 which was eventually put down by forces loyal to Ould Taya, and others for two further attempts to topple the president in August and September 2004 which were nipped in the bud.
The self-proclaimed mastermind of the coup plots, former army major Saleh Ould Hanenna, was condemned to spend the rest of his life in prison along with former army captain Abderahmane Ould Mini.
During the trial, they were the only ones to plead guilty to the charges against them.
Last month prosecutors had requested the death penalty for the pair and 15 other suspects, all believed to be members of the outlawed "Knights of Change" group who want to see Ould Taya out of power.
The president is a former army colonel who seized power himself in a coup in 1984. Since then, he has ruled this desert nation, which trying to get rich from oil, with an iron hand.
In testimony to the court, Ould Hanenna and Ould Mini said they had wanted to put a stop to corruption, tribalism, poor pay and mismanagement in the army, and discrimination against black Africans.
The government of Mauritania, which straddles black and Arab Africa, is dominated by fair-skinned Bidan Moors who have close historical and cultural ties with Morocco.
The defence lawyers had repeatedly denounced the legality of the special court -- headed by two military judges -- throughout the two and a half month trial and they also claimed that their clients had been tortured into making false statements.
The last death sentence served by a Mauritanian court was in 1987. The defence team in Ouad Naga, which included lawyers in Mali, Senegal and France, made direct appeals to the president for clemency and argued that any death sentences would threaten the political and social fabric of this coup-prone nation.
Ould Taya has angered many of Mauritania's staunchly Muslim 2.8 million people by establishing diplomatic ties with Israel and two years ago launching a crack down on Islamic fundamentalist groups in the country.
However, Ould Taya's critics say that his government is using the terror threat to his advantage -- clamping down on the political opposition that wants to see greater democracy in Mauritania.
The prosecution had recommended five-year jail terms for key opposition leader Ould Haidallah as well as Cheikh Ould Horma, who tried to found a new pro-Islamic opposition group last year but was blocked by the government and Ahmed Ould Daddah, another former presidential candidate and the half-brother of Mauritania's first post-independence president. On Thursday, however, all three were cleared.
The opposition leaders were among more than 140 who walked away from the court after having been found innocent or having already served their time in prison, whilst awaiting trial and verdict.
Other defendants received between three years and fifteen years in prison with hard labour. Several of the accused were sentenced in absentia, including Sidi Mohamed Mustapha Ould Limam Chavi, a former adviser to President Blaise Compaore of Burkina Faso.
Ould Taya has accused Burkina Faso and Libya of helping to plan and finance these rebellions, a charge both countries have denied.
Mauritania has close ties with France but increasingly also with the United States and is one of three Arab countries with diplomatic relations with Israel.
Recent offshore oil discoveries have seen a massive and sudden injection of capital in this desert economy but the majority of people complain that the black gold is just fuelling inflation without increasing their income.