By Richard Hamilton
BBC News, Nouakchott
Sidi Mohamed Ould Cheikh Abdallahi, 68, was a minister under the former autocratic President Maaoya Sid'Ahmed Ould Taya, but has since done his best to distance himself from that era.
Mr Abdallahi now has to raise living standards in one of the world's poorest countries
In this election he stood as an independent candidate but he was widely seen to have the backing of the army.
The military council that stood down before these historic elections did not offer any of their own candidates but this is their next best option.
Many people will be surprised that Sidi Mohamed Ould Cheikh Abdallahi beat Ahmed Ould Daddah, who was widely considered to be the favourite.
Ahmed Ould Daddah was also the brother of Mokhtar Ould Daddah - Mauritania's first president and founding father of the nation.
With a name and pedigree like that, it was going to be hard to beat.
With newly-discovered oil wealth, Sidi Mohamed Ould Cheikh Abdallahi's priority should be to deliver growth and prosperity to what has been one of the poorest nations on earth.
Another will be to strive for national unity in a country whose complex population mix of Arabs and sub-Saharan Africans has caused conflict in the past.