Mauritania's government-backed candidate Mohamed Ould Ghazouani has won the country's presidential election, cementing the power of a ruling party that has positioned itself as an ally of the West against Islamist militants.
The electoral commission declared Ghazouani winner late on Sunday with 52 per cent of the vote. His nearest rival, anti-slavery campaigner Biram Dah Abeid, came second with 18.58 per cent.
The election was the first in the sparsely populated Saharan nation's history, since independence from France in 1960, to choose a successor to a democratically elected president.
Ghazouani has campaigned on continuing economic and security progress made under outgoing president Mohamed Ould Abdel Aziz, who took the helm in a 2008 coup, then won elections in 2009 and 2014.
Under the leadership of the 62-year-old president, the economy has grown and will receive a boost when an offshore gas field starts producing next decade.
Hours earlier, government spokesman Sidi Mohamed Ould Maham declared Ghazouani "president-elect" at a news conference, and opposition candidates represented by Abeid said they would contest the results.
"This seems like a coup d'etat ... we are united and will lead the contestation," Abeid, representing himself and the other opposition leaders, said.
The election has been largely peaceful, apart from in some Riyadh, Elmina, and Sebkha regions of Nouakchott, where earlier on Sunday protesters burned tyres and trash before police dispersed them.
Abdel Aziz surprised many of his compatriots and international observers by stepping aside after serving the maximum two five-year elected terms in Mauritania, a country of fewer than five million people comprising a large chunk of the western Sahara Desert.
His decision bucked a trend in which African leaders, including in Rwanda and Congo Republic, have changed or abolished term limits to cling to power.
Despite his economic record, Abdel Aziz has been criticised for not facing up to Mauritania's most searing injustice: the persistence of slavery. Tens of thousands of black Mauritanians still live as domestic slaves, rights groups say, usually to lighter-skinned masters of Arab or Berber descent.
That is despite the practice being abolished in 1981 and criminalised in 2007.
Australian Associated Press