The losing candidate in Mauritania's presidential election was jailed for two years on Thursday along with two other people who had organized a march against slavery, their defense lawyer said.
Police used tear gas to disperse hundreds of protesters who had gathered outside the courtroom, in the southern town of Rosso, local sources said.
Biram Ould Abeid, a prominent anti-slavery activist who came second in last year's election, was arrested during a march in November. His arrest was criticized by human rights campaigners and the European Parliament.
A government spokesman was not immediately available for comment.
Defense lawyer Brahim Ould Ebety said the convictions were for disturbing public order and belonging to an unrecognized organization.
He called the court's decision "a step back in time to the 1980s where people were arrested and judged on false charges," adding that he had submitted an appeal.
A researcher for Amnesty International in West Africa, Gaetan Mootoo, said: "The intensifying crackdown on anti-slavery activists in Mauritania has no legal justification and is symptomatic of the government's lack of respect for human rights."
He called for the immediate release of Ould Abeid and the other two men, Brahim Bilal and Djiby Sow. Seven other activists were released by the court.
Mauritania was the last country to formally abolish slavery, in 1981. It still has the highest prevalence worldwide of slavery per head of population, according to the Global Slavery Index.
President Mohamed Ould Abdel Aziz denies there is slavery in his country, saying that only the consequences of this former practice exist.