Mauritanians have voted to choose their next president, but the incumbent seems certain to retain power because of a boycott by major opposition parties.
Mohamed Ould Abdel Aziz, who assumed power in a coup in 2008 and won elections a year later, has been a staunch ally of the West.
The National Forum for Democracy and Unity, a coalition of main opposition parties, decided to exclude themselves from the contest when the election date was chosen without their input.
They complained that Abdel Aziz's control of state institutions would ensure his victory and described the vote as "grotesque theatre".
Voter turnout varied markedly across the country on Saturday. But in the capital city's poorer outskirts, which are Abdel Aziz strongholds, long lines formed.
The incumbent faces four candidates. Official results are expected on Monday. If no candidate gets more than 50 percent of the vote, a runoff vote will be held on July 5.
Abdel Aziz hails from the country's ethnic Arab elite that long has dominated the ruling class, but his policies have made him popular among the poor black majority.
"The important thing is to keep the state strong where citizens can freely express themselves and vote freely," said Mariam Mint Abdallah, a shopkeeper told The Associated Press as she was voting in an area north of the capital where Abdel Aziz himself voted.
The next president will face huge challenges. Insecurity is growing in the Sahel, a band of countries including Mauritania south of the Sahara Desert.
Armed groups linked to al-Qaeda roam in its vast ungoverned spaces. Mauritania's neighbour Mali was overrun by armed fighters in 2012, until a French-led intervention pushed them back.
But the economy may pose an even greater hurdle.
"There are not going to be a big fixes to Mauritania's democratic process any time soon. And the much bigger challenges are those of economic growth, employment and youth employment," said Jennifer Cooke, director of the Africa programme at the Centre for Strategic and International Studies.