Mauritanians are going to the polls where the outgoing president’s successor faces a battle to control Islamic extremism in the West African nation.

One candidate of sub-Saharan African descent wants to improve race relations in a country where activists estimate tens of thousands of people still live in slavery, despite the practice being banned by the government for decades.

Amnesty International has called on the next president to end rampant human rights abuses of 4.5 million people.

“Anyone who dares to stand up against slavery, discrimination and other human rights violations and abuses is at risk of arbitrary arrest, unlawful detention and even torture,” said Kine Fatim Diop, a West Africa campaigner for the rights organisation.

Mauritania has suffered five coups since independence from France in 1960 and has been led by military rulers for much of that time.

President Mohamed Ould Abdel Aziz himself was head of the presidential guard when he seized power in a 2008 coup. He said he did so to prevent a return to repressive military rule.

He won a landslide election the following year in what opponents called a fraudulent “electoral coup”.

Most opposition parties then boycotted the 2014 election in which Mr Aziz won 82% of the vote according to official results.

The president is barred by the constitution from seeking another term. In respecting term limits instead of seeking to change the constitution, he contrasts with several leaders elsewhere in Africa in recent years.

His successor of choice is former defence minister Mohamed Ould El Ghazouani, a retired general who served as chief of staff of Mauritania’s armed forces.

Mr Ghazouani was chosen by the ruling majority as a presidential candidate after his retirement.

He has campaigned on his security credentials and the outgoing president’s record on fighting Islamic extremists.

“Mauritania has to choose between Mohamed Ould El Ghazouani — who wants to strive toward security, development and progress — or vote for a return to insecurity, bad management and corruption where there is hate, racism and destruction of national unity,” the outgoing president said at a press conference marking the end of campaigning.

The moderate Islamic republic borders Mali, where jihadist rule forced tens of thousands to flee the country’s north to Mauritania in 2012.

While the security situation has deteriorated in Mali even after the extremists were ousted from control, Mauritania has not seen the spillover in violence experienced by Mali’s other neighbours Niger and Burkina Faso.

The opposition candidates in this election include anti-slavery activist Biram Dah Abeid, who was elected to Parliament in September from his prison cell, where he was held on charges his supporters called politically motivated.

He was released late last year after serving four months.

Mauritania was the last country to abolish slavery, doing so in 1981, but did not criminalise it until 2007.

Late last year, the United States ended trade benefits with Mauritania, saying the country is not making sufficient progress toward combating forced labour, including slavery.

The Mauritanian government, however, denies that slavery is widespread.

Candidate Kane Hamidou Baba of the “Living Together” coalition is representing parties backed by Mauritanians of sub-Saharan African descent.

Other candidates include Sidi Mohamed ould Boubacar, a two-time former prime minister who is supported by the opposition Islamist party; Mohamed ould Maouloud, candidate of the Opposition Coalition for Change and Mohamed Lemine El Mourteji Wafi, who hopes to draw the support of younger Mauritanians.

A run-off election will take place next month if no one receives a majority of votes on Saturday.