Morocco registered their first victory in the African Nations Cup but it did little more than restore some pride as they exited the competition along with their Group C opponents in Libreville.

Both sides had lost their first two matches, meaning this encounter was a dead rubber, and so it was no surprise the match lacked real incident.

Younes Belhanda's goal 11 minutes from time proved decisive, the Montpellier midfielder converting a pass from Arsenal forward Marouane Chamakh.

It meant Niger's debut in the tournament ended with just a single goal and no points from their three games.

Belhanda gave a warning of things to come by shooting over from distance early on while Youssef Hadji fluffed his lines following a decent cut-back from the byline.

Niger's Moussa Maazou hit the crossbar with a brilliant volley and the tournament minnows began the second half more brightly, with Abdoul Karim testing goalkeeper Mohamed Amsif from distance.

With the match seemingly drifting towards a tame draw Mbark Boussoufa forced another save from Niger goalkeeper Daouda Kassaly before Belhanda struck in the 79th minute.

Chamakh found space in the penalty area to pick out Belhanda, who smashed home the winner.

Niger were denied a late equaliser when another long-range effort from Karim flew narrowly over the crossbar.

Victory lifted the Atlas Lions to three points as they finished third in the group. Gabon topped the standings with a 100% record after tonight's 1-0 win over fellow qualifiers Tunisia.