A mass trial for nearly 200 people charged in connection with coup attempts has ended in Mauritania, with four accused military leaders getting life sentences with hard labor, but many others, including opposition politicians, being acquitted.

Two of those receiving life sentences were tried in absentia, Mohammed Ould Cheikhna and Mohammed Ould Salek, the founders of a renegade group of soldiers known as the Knights of Change. They are now believed to be hiding in exile.

The two others who received life sentences from the joint military civilian court were the only ones to plead guilty during the trial, former military commander Saleh Ould Hennena and former captain Abderrahmane Ould Mini. Hennena said he had wanted to end dictatorial and corrupt rule in the largely desert nation.

About 80 others received sentences ranging from 18 months to 15 years. The court acquitted more than 100 others, including a former military leader accused of bankrolling the coup plots and two other opposition leaders.

Prosecutors had been seeking the death penalty for 17 of the defendants.

Journalist Salem Bokari says there was a mixture of joy and sadness when the sentences were read out at the court in Wad Naga, a makeshift courtroom attached to the prison where the defendants are being held.

He says families and friends of those acquitted applauded in relief, while family members of those who received the harshest sentences wept.

One of the defense lawyers and head of Mauritania's main human-rights group, Fatimata Mbaye, says the outcome was better than she was expecting. She says it proves the judicial branch was able to resist political pressure, because she said there could have been much more sentencing, given the conditions of the trial.

She says many of the defendants were tortured into making false statements.

Mrs. Mbaye says defense lawyers will now work on appealing the stiffer sentences within the 15-day deadline set by the court.

But she adds, the acquittals save Mauritania's opposition political class.

President Maaouiya Ould Taya who came to power in a coup in 1984 has accused Burkina Faso and Libya of being behind successive coup plots, the first of which in June 2003 led to brief firefights in the capital Nouakchott.

Many of the accused have close ties with Islamic religious clerics who want more democracy and oppose Mauritania's official ties with Israel.

The instability also comes as Mauritania is about to begin exploiting offshore oil reserves, which are expected to begin producing up to 75,000 barrels of oil a day by next year.