Guinea edged Mauritania 1-0 in a dead-rubber Group A fixture at the Stade de Marrakech on Sunday evening.
Both teams entered the clash having already suffered elimination from the 2018 African Nations Championship (Chan), but it will be the Syli Nationale to leave Morocco the happier of the two nations.
Following three straight defeats, Mauritania exit the competition at the foot of their group with Guinea having conjured a mere three points from their allotted matches.
Morocco and Sudan advance to the knockout stages in first in second place respectively following their goalless draw in Casablanca.
Ibrahim Sankhon scored the only goal of the game for Guinea in Marrakech.
The Guinea skipper with a composed finish in the 15th minute of the match following great awareness from Daouda Bangoura who turned his man before teeing up his skipper for what proved to be the game's only goal.
Mauritania threatened to find the equalizer through El Mostapha Diaw and Moulayeahmed Khalil before the break, but the latter was especially unlucky to see his rasping effort fly inches wide.
With clear-cut chances few and far between in the second stanza, Guinea would hold on to claim their first win of the tournament. Both teams, though, head home following a disappointing campaign.
Mauritania (0) 0
Guinea (1) 1 (Sankhon 15')
Mauritania: Souleyamane; Diaw (Lembrabott 82'), Traore (Wade 86'), Mangane, N'Gara, Dellahi, Teguedi (Gueye 75'), Diop, Khalil, Bagili, Tanjy.
Guinea: Kante; Aleseny Bangoura, Fernandez (D.Camara 52'), Landel, Sylla, A.Camara, Sankhon, D.Bangoura (Thiam 78'), Saliou Camara, A.Camara, Seydouba Camara (Barry 90+2').