Needing only a point from the Group C showdown in Abidjan, Morocco – led by the former Cote D’Ivoire coach Hervé Renard - shocked their hosts in the first-half with two goals in five minutes.
Nabil Dirar opened the scoring from a cross-cum-shot on 25 minutes and Medhi Benatia doubled the lead after a corner on the half-hour.
The victory ended Ivorian hopes of a fourth consecutive appearance at the World Cup. There was joy, however, for the visitors who will go the football fest for the first time since 1998.
Tunisia could not find a way past an obdurate Libya side in Rades on the outskirts of Tunis. Nabil Maaloul’s men had to settle for a 0-0 draw but the stalemate was enough to seal Group A.despite Democratic Republic of Congo’s 3-1 win over Guinea in Kinshasa.
Senegal booked their passage on Friday with a 2-0 win in South Africa to take Group D, Nigeria and Egypt had claimed their places from Group B and Group E respectively during the fifth round of games.