Morocco and Tunisia now join Nigeria, Senegal and Egypt as Africa's representatives at next year's FIFA World Cup in Russian Federation.
Unlike Morocco, who missed out on four previous World Cup tournaments (Japan-Korea 2002, Germany 2006, South Africa 2010 and Brazil 2014), Cote d'Ivoire has qualified for the three previous World Cups.
Morocco is back in the spotlight of world soccer following the qualification of the country's national team to the 2018 World Cup, scheduled to take place next summer in Russian Federation.
The Moroccan national team played in the World Cup final last time in 1998.
The Eagles of Carthage headed into their final fixture knowing that they would definitely reach the World Cup if they avoided defeat, but were frustrated by their neighbours.More news: Woman pleads guilty to marrying mom, who was once married to son
More news: Taylor Swift's 'Reputation' Includes a Fiery Kanye West Feud Anthem
More news: Does The Data Supplment NVIDIA Corporation (NASDAQ:NVDA) Movement?
Morocco stunned Ivory Coast 2-0 to qualify for the 2018 World Cup, while Tunisia also booked their ticket to Russian Federation on Saturday.
The first blow came when an intended cross from Dirar went over an Ivorian defender and a Moroccan attacker and slipped past goalkeeper Sylvain Gbohouo into the far corner.
The hosts poured men forward for most of the rest of the match, but Morocco generally looked in control of things at the back and held on comfortably, giving Herve Renard - the coach who ended Ivory Coast's Africa Cup of Nations drought in 2015 - a famous victory against his former team.
In Group A, DR Congo, on 10 points, were still in with a chance to catch leaders Tunisians on 13 points, but despite a late 3-1 win over Guinea, it was too little too late.