Nouakchott (AFP) - A Mauritanian court on Thursday upheld a two-year prison sentence against three anti-slavery activists who were arrested during a protest against bondage in the west African nation.

Biram Ould Dah Ould Abeid, runner-up in the 2014 presidential elections and head of the Initiative for the Resurgence of the Abolitionist Movement (IRA), was jailed in January alongside two other activists.

In an open letter published after the ruling he vowed to continue his fight against slavery and appealed for the United States and European Union to put pressure on Mauritania to act against the practice, including stopping financial aid.

"From my dark cell I urge them to mobilise all legal and diplomatic means, including the suspension of all financial aid, to push the government to take real action to eradicate slavery as well as the racism and exclusion underlying it," he wrote.

The three activists were arrested in November 2014 while protesting slavery and were found guilty of "belonging to an illegal organisation, leading an unauthorised rally, and violence against the police."

The two others convicted were Bilal Ramdane, an assistant to Ould Abeid, and Djiby Sow, a civic and cultural rights campaigner.

Sow has since been released on parole due to health problems.

"This is a step backwards for freedom in our country, an example of judicial authorities submissiveness to executive orders," said defense lawyer Brahim Ould Ebetty, who boycotted the hearing along with his clients.

He slammed a "parody of justice" just two weeks after Mauritania adopted a hardened law to crack down on slavery which activists say is widespread in the west African nation despite being criminalised in 2007.

The new law declared slavery a "crime against humanity", criminalises a raft of new forms of slavery such as forced marriage, and doubles maximum prison terms to 20 years.

"The intensification of the crackdown on anti-slavery activists in Mauritania has no legal justification in a country which ironically just this month adopted a law indicating slavery is a crime against humanity," said Alioune Tine, Amnesty International's director in west Africa.

Story continues

- 'I refuse to be silenced' -

Slavery is deeply entrenched in the vast, largely desert nation where light-skinned Berber Arab Moors enslaved local black Moors known as Haratin after settling in Mauritania centuries ago.

Slave status is also often passed on from generation to generation, said the Australia-based Walk Free Movement which estimated in its 2014 Global Slavery Index that there were 156,000 slaves in Mauritania, or some four percent of the population.

There are no figures available from the Mauritanian authorities. President Mohamed Ould Abdel Aziz said earlier this year that slavery no longer exists in the country, only what he calls "the last vestiges" of an old practice.

The country was the last in the world to abolish slavery, in 1981, and since 2007 its practice has been officially designated a crime.

However activists accused government of failing to implement the laws.

Sarah Mathewson of Anti-Slavery International told AFP only one person had ever been convicted under the old law, and many cases watered down to "unpaid labour".

Mauritanian authorities have accused the IRA of spreading "racist propaganda".

In his letter, Ould Abeid explained how he devoted his life to fighting slavery after his father married a slave and saw his family torn apart by the practice.

"Today I write to you from the depths of a prison into which I have been thrown for calling for an end to this cruel practice," he wrote.

He said that despite his efforts, the government had refused to recognise the IRA which he created in 2008 and instead its members had been "harassed, tortured ... and imprisoned" for belonging to an illegal organisation.

Ould Abeid said stronger action was needed from Mauritania's foreign partners to end slavery in the country.

"I refuse to throw in the towel. I refuse to be silenced. I refuse to abandon ... those whose lives have been ruined by slavery," he wrote.