NOUAKCHOTT, Mauritania (AP) — The candidate chosen by Mauritania's outgoing president has claimed victory only hours after polls closed.

Mohamed Ould El Ghazouani is a retired general who served as Mauritania's defense minister before being chosen as the heir apparent to retiring President Mohamed Ould Abdel Aziz.

The handover will mark the first peaceful one since Mauritania's independence from France nearly 60 years ago though the election's outcome was widely predicted.

Aziz was barred from seeking a third term under the constitution.

Ghazouani campaigned on his security credentials and the outgoing president's record on fighting Islamic extremists.

Mauritania, a moderate Islamic republic, borders the volatile nation of Mali where jihadist attacks are frequent.