Substitute Rachid Alioui’s spectacular volley from 30 yards out in the 64th minute sent the Ivorians packing from the 2017 edition of CAF African Cup of Nations hosted by Gabon.
The shot was sublime, lofted, curling, over Sylvain Gbohouo’s despairing dive and dipping into the net.
The star-studded Ivorians side already needed to score at least one goal, and had barely threatened to do so. And the defeat means Morocco made it to the round of eight in second place while the Democratic Republic of Congo finished as Group C leaders.
Elsewhere, Togo were subjected to a heavy defeat in the hands of DR Congo who topped Group C.
Togo, captained by former Arsenal striker Emmanuel Adebayor, were beaten 3-1 after DR Congo towering striker Junior Kabananga kept up his goal-scoring form to help send his country into the quarter finals.
Kabananga netted the opening goal in the 29th minute before second half contributions from Ndombe Mubele and Paul-Jose Mpoku sealed the comfortable victory for the Congolese senior national team albeit Kodjo Laba pulled one back for Togo, who finished last in the group standings with a single point.
DR Congo accrued seven points from their three group games and will play the team who finished second in Group D on Wednesday in the first knockout round.