Voters in the West African state of Mauritania were called to the polls on Saturday after a campaign dominated by the country's economy and appeals to preserve its hard-won stability.
The ballot is set to be the first in the nation's coup-strewn history that will see an elected president complete his mandate and hand the baton to an elected successor.
President Mohamed Ould Abdel Aziz, a general who himself came to power in a coup in 2008, is standing down after winning high marks from many Mauritanians for stabilising the country.
Elected in 2009 and re-elected in 2014 in a vote boycotted by the main opposition parties, Abdel Aziz has reformed the army, clamped down on jihadists and pushed to develop remote regions of the vast Saharan state.
The frontrunner is Mohamed Ould Ghazouani, 62, a former general, one-time head of the country's domestic security service and chief of staff to Abdel Aziz from 2008 to last year.
Ghazouani campaigned on the themes of continuity, solidarity and security -- "the country's security, first and foremost," he declared on Thursday at a final rally gathering 10,000 supporters, many of them young people.
Abdel Aziz has given full backing to his loyal lieutenant.
"There's only two choices -- either going backwards, towards extremism, waste and instability, or your candidate, who will continue what has been achieved to build a stable and developed state," he declared at the rally.
Ghazouani's main challenger is Sidi Mohamed Ould Boubacar, 62, who was prime minister between 1992 and 1996 and at the helm of a transitional government between 2005-7.
He hopes to win enough support to secure a runoff vote on July 6.
Boubacar is backed by a coalition led by the main opposition movement, Islamist party Tewassoul, and by wealthy Franco-Mauritanian businessman Mohamed Ould Bouamatou, a longtime thorn in the side of the regime who lives in Europe.
Nearly 30 percent of voters say they will vote for Ghazaouani and 23 percent for Boubacar, according to a poll by the Mauritanian Centre for Strategic Studies and Research (CMERS), conducted among 1,300 people in the capital Nouakchott last week.
The four other candidates are outliers in the race, according to the poll.
Known especially abroad for his media campaigning, anti-slavery activist Biram Ould Dah Ould Abeid, 55, is credited with 9.5 percent of voting intentions, followed by veteran opposition figure Mohamed Ould Moloud, 66, with 3.7 percent.
They are followed by journalist Baba Hamidou Kane and political newcomer Mohamed Lemine El-Mourteji El-Wavi, each with under three percent.
Courting the vote
Candidates have been trekking around the vast conservative Muslim nation, a country twice the size of France but with a population of just 4.5 million, to woo voting groups.
They have also courted the heads of tribes and clans in remote regions, who can mobilise whole communities behind a candidate.
The opposition has warned of vote fraud and accused the Independent National Electoral Commission (CENI) of bias.
The authorities have rejected an opposition request for foreign observers.
Rights groups have urged candidates to throw their weight behind a rollback of slavery, which persists in Mauritania, and curbing violence against women.
All the candidates have promised improvements in the standard of living, though economic growth at 3.6 percent in 2018 is insufficient to meet the needs of a fast-growing population, according to the World Bank.
It has called on Mauritania to give more help to the private sector, where, it says, access to credit and corruption are major problems.