Mauritania's government-backed candidate Mohamed Ould Ghazouani won the presidential election on Sunday, 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 Saturday with 52 percent of the vote. His nearest rival, anti-slavery campaigner Biram Dah Abeid, came second with 18.58 percent, while third place candidate Mohamed Ould Boubacar, who is backed by Mauritania's biggest Islamist party, got 17.85 percent.

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.