Younes Belhanda’s goal 11 minutes from time earned Morocco a 1-0 win over Niger in an African Cup of Nations tie involving two Group C teams already eliminated.
It was the last game of the tournament for both nations who finished behind group winners Gabon, the co-hosts, and Tunisia.
Morocco were one of the pre-tournament favourites but have suffered a major crisis of confidence less than six months before launching their World Cup qualifying campaign.
They gave another poor performance against Niger that will not bode well for the future of coach Eric Gerets.
Former Belgium World Cup player Gerets said beforehand that he viewed the match with Niger as a chance to start again after their opening defeats by Tunisia and Gabon.
Morocco dominated possession, their skilful midfielders cleverly interchanging passes but also overelaborating and showing indecision.
The only goal came when Marouane Chamakh, looking suspiciously offside, put Belhanda in for a sliding finish.