International election observers have declared Mauritania's presidential poll to be free and fair.
A second round of voting is expected if no clear winner emerges
Some 70% of registered voters turned out for the first fully democratic poll since independence in 1960.
It marked a final stage of transition to civilian rule after a military coup in 2005. Power has never changed hands at the ballot box in Mauritania before.
Results are expected late on Monday or on Tuesday, with a second round of voting expected in two weeks time.
Sidi Ould Sheikh Abdellahi, who served in the authoritarian government that was ousted two years ago by military leaders demanding democratic reform and his main rival - a long-standing opposition figure, Ahmed Ould Daddah, both have about a quarter of the votes counted so far.
If none of the 19 candidates scores more than 50%, people will return to the polls on 25 March.
"This event marks the turning of a page in the history of Mauritania," said Marie Anne Isler Beguin, from the EU's 80-member election observer mission.
"For the first time, the people have been able to vote freely, without intervention."
Coming of Age
The coup leader, who is standing down, said the poll marked the moment Mauritanians "come of age".
Colonel Ely Ould Mohamed Vall, whose military council took power in August 2005, said he had a great sense of pride because it was the first time that Mauritanians were choosing their leaders in a free and fair way.
"We came to power for a specific purpose. We declared we would do specific things. We stayed only so long as it took to accomplish or goals," said Col Vall, who has barred himself and other members of the junta from running for office.
2,400 polling stations
Keeping the military out of power is seen as a key issue for a country which has seen numerous coups and attempted coups since independence from France.
Mauritania seems to have gone further politically in the last two years than it has in the rest of its history, reports the BBC's Richard Hamilton from the capital, Nouakchott.
Col Vall has changed the constitution so that a president can only run for two terms, has improved human rights and brought democracy to this desert country, our correspondent says.
Before the most recent coup, Mauritania spent 21 years under the iron grip of former President Ahmed Taya and elections in those days were regarded as a sham, he reports.
Mauritania is home to a number of different racial groups and many people were expected to vote along ethnic lines.
Candidates include former ministers but no members of the outgoing military government.
Another key issue is how to unite an ethnically diverse population, which includes Arabs, Berbers and sub-Saharan Africans.
While many presidential hopefuls come from the ruling Arab elite, one candidate represents descendants of slaves.
Despite a ban on slavery in 1980, human rights groups say the phenomenon still exists in the country.
Other major campaign issues have been how to manage the country's new oil reserves and the Islamic republic's decision to recognise Israel.
In February last year, Mauritania started pumping millions of barrels of oil from offshore reserves, though people have still to see any benefits.